3 ms·
>>I'm guessing you have not really looked into Rust. The idea is to also take a "do it right" approach rather then "à la carte". Keep in mind, the focus in in a
by voidlogic 13y ago
>>I'm guessing you have not really looked into Rust. The idea is to also take a "do it right" approach rather then "à la carte". Keep in mind, the focus in in a different domain. Not really sure what basis you have for the "even more bloated" comment.
C++ is too complex of a language IMHO. Complexity is bad for new people as it takes a long time to know the entire language. And its bad for existing people as it provides too many ways to do the same thing. Rusts features look to be a superset of C++... You could substitute "too complex" with "too big".
>>Anyhow, no reason to have a flame war on the subject. Rust isn't a hammer and neither is Go. :)
I thought this was an interesting and friendly conversion, not a flame war. I do think everyone involved in this conversion probably agrees with each other in general, just maybe not particulars.
And yes everyone has their favorite hammer, that doesn't mean its not worth discussing which hammers are best for which tasks.
- lholden 13y ago>> Rusts features look to be a superset of C++... You could substitute "too complex" with "too big". Feature wise I'd say Rust has more in common with a functional language. * Consistent type system. (base types like int are objects) * Emphasis on type safety. * First class functions and Lambdas. * Pattern matching. * All memory is somehow managed or owned. (#1) * Isolated concurrent memory. (No need for semaphores/mutexes) * 'variables' are immutable by default. * Types with traits instead of a "class" system. (#2) * No exception catching (#3) * Generics (#4) * No direct null/nil (Options are used instead.) * Concurrency is built in. * Can allocate on the stack, or via a managed 'box' on the heap. (#5) * Has the ability to link to and call C code. * Has the ability to break out into inline assembly. * Macros. (#6) The manual is reasonably decent: http://static.rust-lang.org/doc/rust.html http://static.rust-lang.org/doc/rust.html #1) Technically you can break out into unsafe memory operations or assembly. You have to specifically mark your code as 'unsafe' when doing so however. #2) Similar to Haskell type classes and way simpler then C++ classes. #3) There is a kind of error/exception but they are way simpler and not meant to be managed like in C++/Java #4) Don't confuse generics with C++ templates. (C++ templates can be used for the same purpose, but is WAY more complex and interesting.) #5) Perhaps the most complex part of the language... Boxes are a bit like smart pointers but with way less code involved. #6) I have not gotten into this very deeply yet but it looks more like Lisp macros instead of C/C++ macros/preprocessing. For perspective... C++ has about 84 keywords. Go has 25 keywords plus several predeclared identifiers (true and false for example). Rust currently has 32 keywords. (Some of which are just syntactic sugar). >> I thought this was an interesting and friendly conversion, not a flame war. (Was trying to show that she saw the subject light heartedly.) It was meant more as a tease then an accusation :)