Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 17 submissions in the queue.
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: 0) by Anonymous Coward on Monday January 16 2017, @11:28PM

    by Anonymous Coward on Monday January 16 2017, @11:28PM (#454598)

    Which C/C++? C++11? C++14? Because C++ has changed a lot over the years. I don't mean the core language so much, of which most changes were only minor tweaks, such as ways to reduce some of the pointer syntax, and declare constants. Namespaces are possibly the biggest of the older changes to the core. More recent is this "auto" return type. The change I'm thinking of is the addition of the Standard Template Library, which, it could be argued, isn't integral to the language at all, any more than stdio or string ever were.

    Perl was hot when it was the best regex engine readily available. Then we had PCRE for C/C++, which makes the use case for Perl weaker. Hashes? C++ has that too, in STL Maps. Other parts of STL cover other native features of Perl. So what does that leave for reasons to pick one over the other? C++ still has ugly pointer syntax, but Perl's syntax is loaded with the ugliness of sigils. C++ has a larger ecosystem. Yet Perl has tons of wrapper libraries to access all these useful C libraries. Perl 6 supposedly improved greatly over Perl 5 in ability to call C library functions, which could remove that reason to pick C++ over Perl. They're both curly brace languages. Maybe fast compiling is a reason to pick Perl over C/C++? But really, why not ditch both for Python?

  • (Score: 2) by rleigh on Monday January 16 2017, @11:46PM

    by rleigh (4887) on Monday January 16 2017, @11:46PM (#454611) Homepage

    Minor nitpick, in the C++ standard library map is a red-black tree; you want unordered_map for a hash map.

  • (Score: 3, Funny) by Ethanol-fueled on Monday January 16 2017, @11:52PM

    by Ethanol-fueled (2792) on Monday January 16 2017, @11:52PM (#454613) Homepage

    Because Python is clumsy and retarded.

    Python is a language one uses because they don't know C/C++/Perl well enough to avoid blowing up their call stack or reading from unallocated memory.

    Oh, shit. I've been trolled again.