Live data from Hacker News

Still in love with Rust

dpc.pw

121–130 of 186 posts

Re: Still in love with Rust

#121

Can someone familiar with both Rust and F# (or OCaml) type systems write few words about the expressiveness aspect of the language? What would I miss in Rust if coming from the F# background?

Fun fact: Rust was originally implemented in OCaml, and takes a lot of inspiration from it. Rust was originally described to me by someone as "C meets OCaml."

The biggest thing missing in Rust that are in both are higher kinded types. The biggest thing missing from OCaml is parameterized modules.

Re: Still in love with Rust

#122

Another point against Rust is binary size. If you write the Fibonacci generator in one of the first chapters of the Rust book it will create a 4MB binary. Even stripped it's over 400KB. If you write the same code in Nim it compiles down to 112KB with debug symbols, unstripped. Statically linked against libc (still with debug symbols) it's only 850KB. 850KB statically linked versus ~450KB dynamically linked and stripp…

Does this matter anywhere outside of embedded software nowadays?

Re: Still in love with Rust

#123
> Now I see how before Rust I was often writing my code in a typical OOP-way: forming complicated graphs, with many objects referencing each other, with unclear relationships. The class APIs, inheritance hierarchies, were there, but they were just obstructing the core problem: structuring and manipulating data... Rust will force you to be a good programmer, you like it or not.

Rust today demands static knowledge of all relationships. But class APIs, inheritance hierarchies, and the like are powerful tools for dealing with dynamic relationships: code that runs together yet evolves separately, where Rust is feeble. Good programmers recognize that different problems require different solutions!

Re: Still in love with Rust

#125
post #110

Earlier quoted context omitted.

Thanks for the clarification.

No problem. Others haven't had this conversation as many times as you and I have :)

Yep, I still look forward to eventually advocate the contrary.

Even when I sometimes sound negative, I really appreciate your work.

Rust achievements thus far already influenced design decisions in other languages.

Re: Still in love with Rust

#126

> Now I see how before Rust I was often writing my code in a typical OOP-way: forming complicated graphs, with many objects referencing each other, with unclear relationships. The class APIs, inheritance hierarchies, were there, but they were just obstructing the core problem: structuring and manipulating data... Rust will force you to be a good programmer, you like it or not. Rust today demands static knowledge of a…

Rust is feeble at patterns it wasn't made for (OOP), absolutely. :). Composition over inheritance.

Re: Still in love with Rust

#127
post #24

> Let's face it – typically developers are familiar with OOP, garbage collected, dynamic programming languages. I think most of these programmers, and their project are not the target of Rust? If you're writing Java/C# or higher level languages, you already made the choice to sacrifice some computing efficiency for programming efficiency. I always thought Rust was more destined to convert C and C++ (and D/Swift/Go ?)…

I originally picked up Rust because I couldn't make audio processing in JS fast enough.

I stayed because I found Rust to be a language that not only doesn't get in your way, but also helps you out of some situations.

I mean, I had the compiler say to me "Perhaps you could [...]". Perhaps. And nine out ten times it was a good suggestion.

Re: Still in love with Rust

#128
post #10

> Rust will force you to be a good programmer, > [if] you like it or not. This is probably the best in-a-nutshell statement that describes what a good programming language is for me. I had similar moments in the past. Before Python I cared about indention to some degree. But once I got used to the way Python forces you to indent your code, I came to the realization that this is pretty much the way I should format my…

Only as good as Rust allows you to be, which is fine for some until they stagnate or grow out of it; but far from the final answer to anything. I don't get at all how being forced to do anything could ever be a good thing. Smells like cognitive dissonance from here. I'm all for powerful tools that enables me to write better code faster; but being forced, really? That's the best thing about Rust? Ew.

So all programming languages at a higher level than ASM are horrible to you? They don't allow you to write everything that pure ASM does. Even C enforces structured programming.

Re: Still in love with Rust

#129

Earlier quoted context omitted.

It's like the Sapir-Whorf hypothesis. The strong version is nonesense, but the weak version has some evidence. A tool cannot make you a good programmer, but it can help you be a good programmer.

OK, so a programming language won't make you a good programmer, indeed ;) Edit: This place is disappointingly childish... It does not reflect well on Rust, either.

> Edit: This place is disappointingly childish... It does not reflect well on Rust, either.

You're getting downvoted not because of the alleged childishness of this place, but because you're trying to win a discussion on a complex issue by scoring a simplistic "gotcha".

Re: Still in love with Rust

#130
post #129

Earlier quoted context omitted.

OK, so a programming language won't make you a good programmer, indeed ;) Edit: This place is disappointingly childish... It does not reflect well on Rust, either.

> Edit: This place is disappointingly childish... It does not reflect well on Rust, either. You're getting downvoted not because of the alleged childishness of this place, but because you're trying to win a discussion on a complex issue by scoring a simplistic "gotcha".

Hmm, my original comment was not a "gotcha" it is the simple truth.

Anyone trying to sell you a tool by claiming that "it will make you a good whatever" is just trying it on. Yes, a good tool can help achieve better results but that's not the same at all.

Then, all the replies I received were seemingly defiant but all in fact agreed to the point while trying to sound smart.

Post reply on HN