Originally posted by roughl
View Post
Announcement
Collapse
No announcement yet.
Rust Porting Begins For Intel's "e1000" Linux Network Driver
Collapse
X
-
Originally posted by Volta View Post
i += 1;
Really? Also 'let this, let that'. This is some js syntax bullshit. Couldn't they keep it more C like?
Example:
PHP Code:var i = 10;
i = i++;
// Is i now 10 or 11?
- Likes 14
Comment
-
Originally posted by kpedersen View Post
Exactly. So my point is that perhaps Rust's strengths are not ideal here. It will all just be bindings and unsafe {} sections.
- Likes 11
Comment
-
Originally posted by mdedetrich View Post
For a completely trivial driver I would agree. However most modern drivers aren't written for OS's built in the 90's where drivers were largely just memory mapped IO. From what I can tell they deliberately picked a trivial driver just to see if there were roadblocks, the real payoff is in more typical modern day drivers.
- Likes 2
Comment
-
Originally posted by Volta View Post
I think (and hope) it's not such common when value equals 1. I've just check and incrementation and decrementation in C like way is not possible in Rust. WTF? .
Originally posted by VoltaI'm not used to beg someone to 'let' me something. The one who chose this word must be some kind of beta. I'd prefer something like: auto name_of_var. 'Let' is completely unintuitive. Thanks for explanation btw.
to cause to : make; to give opportunity to or fail to prevent; —used in the imperative to introduce a request or proposal… See the full definition
Let has a completely different context in programming, mostly originating from math: https://en.wikipedia.org/wiki/Let_expression
- Likes 5
Comment
-
Originally posted by Weasel View PostThat's exactly the problem. Let should only be used for functional languages, which Rust is not. There's a reason they're so cryptic for programmers instead of math nerds. Keep that shit away from structured languages.
- Likes 12
Comment
-
Originally posted by RahulSundaram View Post
Let has been used in many many non functional languages starting with BASIC (like 50 years ago) and more recently Swift and Kotlin. You are just unaware of it.
Lets call it out as it is, these complaints are really just distraction/venting mechanism for people that don't like Rust for largely irrational reasons. I am also not a fan of Rust's syntax (they admitted they copied C++ syntax to make it easier for C++ people to migrate over even though arguably there are much nicer syntax's, i.e. Ruby/Scala) however in the grand scheme of things its a really minor gripe.
- Likes 22
Comment
-
Originally posted by Weasel View PostThat's exactly the problem. Let should only be used for functional languages, which Rust is not. There's a reason they're so cryptic for programmers instead of math nerds. Keep that shit away from structured languages.
I honestly don't understand how you guys where ever able to learn any programming language, if you already hang up on such a simple thing like let. I'm just a hobby programmer and needed nothing else than one code example to get how this works.
- Likes 20
Comment
-
Originally posted by Volta View Post
i += 1;
Really? Also 'let this, let that'. This is some js syntax bullshit. Couldn't they keep it more C like?
You do realize these are all representations of the same thing and whichever you pick, can be argued against just as easily.
- Likes 9
Comment
-
Originally posted by Volta View Post
i += 1;
Really? Also 'let this, let that'. This is some js syntax bullshit. Couldn't they keep it more C like?
The "let" syntax allows (among other reasons) for better tooling and also simpler manual grepping through the sources, as a side effect. But it has a purpose as a functional construct, it's irrefutable pattern matching, not just variable declaration.
- Likes 11
Comment
Comment