News for hackers. Stuff that matters.
Re:Ask HN: Will Rust ever become a mainstream systems progra... by sidlls on Monday April 10, 2017 @05:36PM (#14082778)
> But the object system (yeah, they're called structures and traits) is too weird.

Alternative view: the clean separation of data from API has a nice analogy to the manipulation of data in C, and a powerful way to maintain that separation while still allowing for powerful object oriented programming where appropriate.

> The enum approach to variant records is too weird.

I disagree. The tagged union is an oft-used pattern in C and C++ code. Maybe calling it "enum" is a bit off, but the concept is incredibly useful, and Rust's​ compile-time support for it is incredibly useful and powerful in my opinion.

> The error handling is too weird.

It's very C-like, but more strongly typed and, thanks to the Rust developers' efforts, quite clean. A C programmer, or a C++ programmer who sets the "no exceptions" flag as a matter of best practice should feel quite comfortable with Rust's error handling.

> The half-functional style is too weird. The widespread use of closures for simple stuff is too weird.

I would substitute "cute" for weird, but overall I don't mind it. I do agree that emphasis on making these features more prominent, especially at the expense of more explicit (e.g. explicit for-loop) constructs, might hinder traction.

Re:Ask HN: Will Rust ever become a mainstream systems progra... by kbenson on Tuesday April 11, 2017 @05:27PM (#14092619)
> I do agree that emphasis on making these features more prominent, especially at the expense of more explicit (e.g. explicit for-loop) constructs, might hinder traction.

I thin kit depends on both where the new users are coming from, and how much they've modified their thinking to a specific programming style. If you are a C or C++ programmer and already think in conceptualized for loops when planning steps, then it seems odd. If you haven't gone that far into letting that style define your thoughts, or continued to use other languages that were a bit more functional, you might find that that conceptually it's easier to reason about.

I.e. "I'm going to transform each of these items by doing X, Y and Z and store them here" as a concept is neither directly a for loop nor a map a the basest level, but you might start thinking in maps or loops after a while if that's your only option.