Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

RUST

Name: Anonymous 2014-05-29 19:52

Should I learn it?

Name: bust a rhymes 2014-05-29 20:00

rust a shit

Name: Anonymous 2014-05-29 21:14

Here's why one should be wise regarding Rust:
- Rust indulges obfuscation: Rust has no keyword/optional arguments, so you'll have to use hash parameters as a substitute. This is an idiom that comes from Perl. Ugly, Perl-looking code, like proc {|obj, *args| obj.send(~self, *args)} or (0..127).each { |mut ~n| p(box n.chr) }, considered beautiful. Another confusing Haskell borrowing are `let`, `->`, and typeclasses (let mut ~line = monad::io::map_sequence(&file) { |mut &file| sys::fil::io::readline(line -> if valid(line) { Ok(line) } else { Err(line) }); };) and quirky variable names (partially due to naive environment design): std::lib, struct.member, builtin_type, UserType, @heap, ~box, &ref, ~mut ref, @mut heap, mut &ref_to_mut, mut &mut &ref, macro!(...) and #[pragma]. If A is ~[1,2,3] and B is @[10,20,30], then A+B is a compiler error, when you probably wanted [11,22,33]. If `a` and `b` are undefined, then "a = b" produces a different error, but "a = a" gives `nil`.
- Faulty syntax. Rust cant distinguishing a method call from an operator: "a +b" can be both "a(+b)" and "a + b" - remove the space to the left of "+" or add a space to the right of "+", and it will be parsed as an addition. Same with "puts s *10", which is parsed as puts(s(*10)). Rust's expressions terminate by a semicolon and you have to implicitly state that the expression is not over, using trailing + or \. That makes it easy to make a dumb syntactic mistake by forgeting to continue line. It also encourages putting everything onto a single line, producing messy looking code. A good amount of your code will consist of "{ {} { {} } }..." noise.
- Slow: JIT-compiling implementations exist, but they're still slow and incomplete, due to Rust's complexity and bad design, which make Rust difficult to optimize compared to other enterprise quality languages, like Lisp. For example, Rust has to accomodate for somebody in another thread changing the definition of a class spontaneously, forcing compiler to be very conservative. Compiler hints, like `int X` from C/C++ or `declare (int X)` from Lisp, arent possible either.
- Rust's GC is a naive mark-and-sweep implementation, which stores the mark bit directly inside objects, a GC cycle will thus result in all objects being written to, making their memory pages `dirty` and Rust's speed proportional to the number of allocated objects. Rust simply was not designed to support hundred thousand objects allocation per second. Unfortunately, that’s exactly what frameworks like Servo do. The more objects you allocate, the more time you "lose" at code execution. For instance something as simple as 100.times{ ‘foo’ } allocates 100 string objects, because strings are mutable and therefore each version requires its own copy. A simple Servo 'hello world' already uses around 332000 objects.
- OOP: Brendan Eich had a bit too much of the "functional programming is the light and the way" philosophy in him, in effect Rust doesn't have modular namespacing and Rust's blocks can't be used in exactly the same way as usual closures. Even high-order functions are attached to objects and produce verbose code: "names.map { |name| name.upcase }", instead of simple "map(upcase, names)".
- Rust (like most other research languages) does not require variable types to be declared, as (declare (x integer) ...) in Lisp or int x = ... in C/C++. If you want a variable private to a block, you need to pick an unique variable name, holding the entire symbol table in your head. Rust introduces new variables by just parsing their assignements, meaning "a = 1 if false; a" wont raise an error. All that means Rust can't detect even a trivial typo - it will produce a program, which will continue working for hours until it reaches satori. Local and global scopes are unintuitive. Certain operations (like regular expression operator) create implicit local variables for even more confusion.
- "method_missing!(mut &args) { ... }" is a blackhole, it makes language semantic overly cryptic. Debugging code that uses method_missing is painful: at best you get a NoMethodError on an object that you didn't expect, and at worst you get SystemStackError.
- Non-othogonal: {|bar| bar.foo}, proc {|bar| bar.foo}, lambda {|bar| bar.foo}, fn baz(bar) { bar.foo } - all copy the same functionality, where Lisp gets along with only `lambda`. Some Rust's features duplicate each other: printf!("Hello"), puts("Hello"), &stdout.write("Hello"), p("Hello"), write("Hello") and map!(putc, "Hello") -- all output text to stdout; there is also sprintf, which duplicates functionality of printf and string splicing. begin/do/then/end, {} and `:` also play role in bloating syntax, however, in some cases, precedence issues cause do/end and {} to act differently ({} binds more tightly than a do/end). More bloat comes from || and `or`, which serve the same purpose.
- Rust as a language supports continuations via callcc keyword. Rust's callcc is incredibly slow, implemented via stack copying. JRust and LLVMRust don't have continuations at all, and it's quite unlikely they will ever get them. There were also support breaches in mainline Rust, where Rust 0.9 has not supported continuations for a while. If you want your code to be portable, I'd suggest not using Rust.
- Rust was created "because there was no good scripting language that could handle Japanese text". Today it's mostly Servo hype and no outstanding feature, that makes the language, like the brevity of APL or simplicity and macros of Lisp. "There is some truth in the claim that Rust doesn’t really give us anything that wasn’t there long ago in Haskell and C++, but they weren’t bad languages." -- Matthew Huntbach

Name: Anonymous 2014-05-29 21:24

>>3
Never thought I'd say this, but I love you, Nikita!

Name: >>4 2014-05-29 21:28

Oh wait. Never mind.

It's just some faggot who modified Nikita-san's anti-Ruby kopipe. We should petition Nikita-san for a genuine anti-Rust kopipe!

Name: Anonymous 2014-05-30 0:37

>>5
Yeah, sorry, I just wanted to post something, and Rust isn't quite mature enough for me to complain about anything substantial, so I just edited his shit because that sort of seemed funny at the time.

Name: Anonymous 2014-05-30 6:21

`
>mozilla

rust a big poop

Name: Anonymous 2014-05-30 6:26

>>7
How do I rust a poop? I thought rusting only happened to metals.

Name: Anonymous 2014-05-30 6:29

>>8
what if you poop a metal or if you poop a rust? I think this will transfer the rust to the poop just like in aids

Name: Anonymous 2014-05-30 6:30

>>8
oxidize my anus

Name: Anonymous 2016-07-11 5:29

(stopping the dubsfaggot from dubsbumping)

Don't change these.
Name: Email:
Entire Thread Thread List