Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> it's senselessly different from the way the rest of the world does things. Because every way of doing "x" has already been tried and the way we do things _right_ _now_ is hands down the absolute best way right? Less snarkily, I think experimentation is good - we come up with new approaches and ways of doing things (which could solve any number of previously difficult problems) and helps prevent "monocultural" approaches to things.

> It's another obstacle to new programmers... Why is it an obstacle rather than just something they learn? You could just as easily argue that the OO approach of wrapping up structure and functionality in a single object is equally "just another obstacle for new programmers".

> in a language that is filled with booby traps for the newbie.

That's a bit of an unfair statement, Rust has a learning curve, but it is certainly not filled with booby traps: it goes to great pains to make things transparent and be upfront about things. C++, JS or PHP are languages that I'd call filled with booby traps for beginners...



> Because every way of doing "x" has already been tried and the way we do things _right_ _now_ is hands down the absolute best way right?

Absent evidence to the contrary, yeah. Generations of hackers have been expressing designs perfectly well with traditional class syntaxes. This is a long solved problem, and a skill you can rely on when moving between C++ or Java or C# or python or Ruby or JS (though Javascript tried to get fancy in this space too and had to bolt on traditional syntax later). But to get stuff working in rust you have to learn a different metaphor. That's bad a priori unless there's a clear advantage. And be real: there isn't, it's just syntax churn.

To wit, if it ain't broke don't fix it.


> Absent evidence to the contrary, yeah. Generations of hackers have been expressing designs perfectly well with traditional class syntaxes.

On the contrary, what Rust does is a direct counter to the most notorious pitfalls of "extends" inheritance. Generations of OO experts and advocates have gone on at great length about "has a" versus "is a" relationships, about the importance of favouring composition over inheritance, about "SOLID". But these things are only communicated by oral tradition, so they remain as booby traps for every newcomer learning to design a system. It's past time that languages did more to help those newcomers (and to be fair Rust isn't the first here: Go, Kotlin, and even Java (with its separate keyword for interfaces) all made significant progress in this direction).


> Generations of hackers have been expressing designs perfectly well with traditional class syntaxes.

“Traditional class syntaxes” have existed for only half the time since people started thinking about object-oriented programming in the 1950s— C++ was only invented in 1983, and didn’t get popular until the mid-90s. That puts it in widespread use for only one generation, and about due to be supplanted by the next major paradigm (maybe async/promises/futures).

It won’t go away, of course: structured, functional, and procedural programming are all standard tools used by most programmers today alongside object orientation. We just have enough experience with them to know what problems each is best and worst suited for, and this is what you’re seeing in Rust; it treats OOP as one useful tool in the toolbox instead of a panacea that makes everything better.


> And be real: there isn't, it's just syntax churn

No. I have programmed in C, C++ and Rust.

Rust is much different, and it is not "just syntax ..."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: