Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Monday January 16 2017, @08:42PM   Printer-friendly
from the comparing-tools dept.

Eric S Raymond, author of "The Cathedral and the Bazaar", blogs via Ibiblio

I wanted to like Rust. I really did. I've been investigating it for months, from the outside, as a C replacement with stronger correctness guarantees that we could use for NTPsec [a hardened implementation of Network Time Protocol].

[...] I was evaluating it in contrast with Go, which I learned in order to evaluate as a C replacement a couple of weeks back.

[...] In practice, I found Rust painful to the point of unusability. The learning curve was far worse than I expected; it took me those four days of struggling with inadequate documentation to write 67 lines of wrapper code for [a simple IRC] server.

Even things that should be dirt-simple, like string concatenation, are unreasonably difficult. The language demands a huge amount of fussy, obscure ritual before you can get anything done.

The contrast with Go is extreme. By four days in of exploring Go, I had mastered most of the language, had a working program and tests, and was adding features to taste.

Have you tried using Rust, Go or any other language that might replace C in the future? What are your experiences?


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Insightful) by shipofgold on Monday January 16 2017, @10:16PM

    by shipofgold (4696) on Monday January 16 2017, @10:16PM (#454559)

    IMHO the language that it is written in has no bearing on the undocumented details of file X.

    The age of the project has a huge bearing on it. Take any give software project and start with today's requirements (as opposed to the initial requirement and all the mods done over the years) and the re-write will look completely different.

    I doubt that after 20 years of changes/updates/new featuers a rust or go program will look any better.

    Starting Score:    1  point
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 0) by Anonymous Coward on Monday January 16 2017, @10:31PM

    by Anonymous Coward on Monday January 16 2017, @10:31PM (#454569)

    I doubt that after 20 years of changes/updates/new featuers a rust or go program will look any better.

    ding ding ding, and we have a winner. The reason that there are no horror-codebases in Rust is because there are no codebases in rust...

  • (Score: 2) by meustrus on Tuesday January 17 2017, @02:59PM

    by meustrus (4961) on Tuesday January 17 2017, @02:59PM (#454909)

    Different languages have different levels of referential transparency. This is a key concept that describes, among other things, whether you actually know what a function does based solely on its method signature. When you convert an existing function with all kinds of side effects (memory management, throwables, write-only API calls, networking, etc.) to a completely referentially transparent function, you tend to end up with a huge mess of templates/generics wrapping your result. That shows you the full complexity of what you were doing all along, but it makes the function really hard to deal with because you have to handle every single eventuality. A referentially transparent function will cause compiler errors if you don't.

    Rust makes pointers more referentially transparent, thereby making them safer while making them harder to use. In this case Raymond has found the safety not worth the trade-off in ease of use. Which raises the question: if propagating or handling the side effects of memory management is necessarily this hard, should we ever do it to begin with?

    --
    If there isn't at least one reference or primary source, it's not +1 Informative. Maybe the underused +1 Interesting?