Most active commenters

    ←back to thread

    451 points birdculture | 16 comments | | HN request time: 0.002s | source | bottom
    1. LAC-Tech ◴[] No.43980029[source]
    I have taken the time to learn rust and you're absolutely right. It's a very complex, design-by-committee language. It has brilliant tooling, and is still much less complex than it's design-by-committee competitor C++, but it will never be easy to learn.
    replies(3): >>43980172 #>>43980282 #>>43980583 #
    2. worik ◴[] No.43980172[source]
    There is a trade off. Rust gave us fast, and safe. It did not give us "easy to learn".

    I think it is a very good example of why "design by committee" is good. The "Rust Committee" has done a fantastic job

    Thank you

    They say a camel is a horse designed by a committee (https://en.wiktionary.org/wiki/a_camel_is_a_horse_designed_b...)

    Yes:

    * Goes twice as far as a horse

    * On half the food and a quarter the water of a horse

    * Carries twice as much as a horse

    Yes, I like design by committee. I have been on some very good, and some very bad committees, but there is nothing like the power of a good committee

    Thank you Rust!

    replies(1): >>43980457 #
    3. rat87 ◴[] No.43980282[source]
    its not design by committee its design by Pull request It doesn't have a central https://en.wikipedia.org/wiki/Benevolent_dictator_for_life like python used to so people suggest and implement features as a group, with code counting for a lot (although theoretical issues with safety/design also matter) as opposed to companies arguing for their pet features endlessly without much difference. Look at how long it takes C++ to get any new features.
    replies(1): >>43980383 #
    4. rafram ◴[] No.43980383[source]
    > Look at how long it takes C++ to get any new features.

    I’m not sure “it doesn’t have enough features” has ever been anyone’s complaint about C++.

    replies(1): >>43987964 #
    5. LAC-Tech ◴[] No.43980457[source]
    It's just a programming language, not a religion.
    replies(1): >>43981388 #
    6. yodsanklai ◴[] No.43980583[source]
    > It's a very complex

    I find it relatively simple. Much simpler than C++ (obviously). For someone who can write C++ and has some experience wth OCaml/Haskell/F#, it's not a hard language.

    replies(1): >>43980684 #
    7. namuol ◴[] No.43980684[source]
    Sure, C++ has a more complex spec, nobody can argue against that.

    Complex is the wrong word. Baffling is a better word. Or counterintuitive, or cumbersome. If “easy enough for someone with experience in C++, OCaml, Haskell, and F#” were the same thing as “not hard” then I don’t think this debate would come up so frequently.

    replies(2): >>43981521 #>>43981689 #
    8. psychoslave ◴[] No.43981388{3}[source]
    Well, it does look like there is a will to mimic religious social structure in the community, be it as a satiric form of it. I mean, I guess they purposefully named their pancakes cargo, as in "cargo cult", didn't they? Rustacean, rustomicon, and the other few words I saw leak out of the community all seem to go in the same spirit. I'm almost surprised they didn't went with more fancy terms for these core concepts of ownership and borrowing. Perl was also full of religious stuff like blessing your object, though Larry was actually more in the "true devot" side of the line.
    replies(1): >>43982847 #
    9. estebank ◴[] No.43981521{3}[source]
    What you call "baffling", I call "different". Being different doesn't mean it's "complex" or even "hard" (in isolation), but it can be baffling, in the same way that driving on the other side of the road for the first time can feel baffling (but doesn't mean it's "wrong").
    10. yodsanklai ◴[] No.43981689{3}[source]
    Of course, this is very subjective. For someone who only knows python or javascript at a superficial level, Rust may seem out of reach. But if you're ok with the most common programming paradigms, I don't find Rust baffling.

    I mean, you can't expect to learn a new language in a few days, it'll always take a bit of work. My feeling is that people complaining of the language being hard aren't putting the effort.

    My experience is that Rust is a relatively small language which doesn't introduce a lot of new concepts. The syntax is quite intuitive, and the compiler super helpful. The borrower checker was the only new thing for me. I'm not an expert at all, but my experience is that after spending 2 weeks full-time reading books and experimenting, I was able to work professionally with the language without feeling too much friction.

    On the other hand, after spending much more time on C++, I don't feel really comfortable with the language.

    replies(2): >>43985502 #>>43986634 #
    11. conorjh ◴[] No.43982847{4}[source]
    the dogmatic culture would probably be my first suggestion. i always ask why are there any CVEs for rust if its "memory-safe" but never get an answer suprisingly
    replies(2): >>43983755 #>>43984581 #
    12. psychoslave ◴[] No.43983755{5}[source]
    CVE is not only for memory leak though, while eliminating (or even drastically reducing) such a class of issue is a fair point to advertise, it should not be confused as a magic safety facility that makes go away any security concern.
    13. steveklabnik ◴[] No.43984581{5}[source]
    > i always ask why are there any CVEs for rust if its "memory-safe" but never get an answer suprisingly

    The answer is straightforward: bugs exist. Even in formally proven software, mistakes can be made. Nothing is perfect.

    Additionally, memory safety is a property that when people talk about it, they mean by default. All languages contain some amount of non-proven unsafe code in their implementation, or via features like FFI. Issues can arise when these two worlds interact. Yet, real-world usage shows that these cases are quite few compared to languages without these defaults. The exceptions are also a source of the CVEs you’re talking about.

    14. icedchai ◴[] No.43985502{4}[source]
    C++ is a huge and complex language. I worked in it, on and off, from 2002 through 2014 or so and never really felt comfortable, either. Everyone seems to use their own dialect.

    (I'm working on learning Rust on my free time.)

    15. ModernMech ◴[] No.43986634{4}[source]
    My feeling is that Java / C++ / Python / Javascript are all really the same language when you get down to it. Rust borrows from OCaml more than an other popular imperative languages (the first implementatoin by Graydon Hoare was in OCaml, so the inspirations abound), and therefore it really is quite different to a lot of devs who have never seen the functional paradigm. Good rust is written as a mix of imperative with a strong functional flavoring. Bad Rust is when you try to do everything by mutating arrays over iteration as you would do in imperative languages.

    For me, I almost never write "for loops" and "if statements" in Rust; instead I use "functional iterators" and "match expressions", which interface with the borrow checker more nicely.

    For example, iterating over an array while modifying it is a common pattern in imperative languages that compiles fine but often causes hard to reason about logic errors during runtime. In Rust, such a thing would cause compile time errors. So instead you rewrite to be more functional, it compiles, and then the magic is it just works, which is a common property of functional languages like Haskell.

    IMO a lot of the consternation about the cost of the learning curve is because developers haven't realized once you get past it, the benefit is your code more often is just correct and therefore you run into fewer runtime bugs. In other languages you get the code compiling faster, but then you spend a great deal of time debugging things at runtime which you didn't anticipate at compile time.

    16. rat87 ◴[] No.43987964{3}[source]
    There are definitely some c++ features that some people have been clamoring for for over a decade

    Pattern matching for one(although to be fair that's been in rust from the start)