3 ms·
I'm not sure why people say this about certain languages (it is sometimes said about Haskell, as well). The code has a C style to it, but that doesn't mean it
by solidsnack9000 2y ago
I'm not sure why people say this about certain languages (it is sometimes said about Haskell, as well).
The code has a C style to it, but that doesn't mean it wasn't actually written in Rust -- Rust deliberately has features to support writing this kind of code, in concert with safer, stricter code.
Imagine if we applied this standard to C code. "Zlib-NG is basically written in assembler, not C..." https://github.com/zlib-ng/zlib-ng/blob/50e9ca06e29867a9014ea187eb0f46fff5125ed2/arch/arm/acle_intrins.h#L22 https://github.com/zlib-ng/zlib-ng/blob/50e9ca06e29867a9014e...
- ajross 2y ago> Imagine if we applied this standard to C code. "Zlib-NG is basically written in assembler, not C..." We absolutely should, if someone claimed/implied-via-headline that naive C was natively as fast as hand-tuned assembly! This kind of context matters. FWIW: I'm not talking about the assembly in zlib-rs, I was specifically limiting my analysis to the rust layers doing memory organization, etc... Discussing Rust is just exhausting. It's one digression after another, like the community can't just take a reasonable point ("zlib-rs isn't a good example of idiomatic rust performance") on its face.
- solidsnack9000 2y agoI'm not sure anyone really believes `zlib-rs` is a good example of idiomatic Rust performance, though Maybe the reason I think that is because I've written Rust for a variety of purposes (web application, database bindings, high performance parser) so I account for the "register" of Rust that is appropriate without thinking about it. https://en.wikipedia.org/wiki/Register_(sociolinguistics) https://en.wikipedia.org/wiki/Register_(sociolinguistics) It might be that a simple description like the headline leads some people to believe they could write Rust the easy way and get code that's as fast as writing "Rust the hard way". However, that is different than what you earlier said -- "It's... basically written in C.". I have actually written Rust programs where some parts were literally written in C and linked in -- in order to build functioning plugins -- and there is a world of difference with that. Regarding Discussing Rust is just exhausting. It's one digression after another, like the community can't just take a reasonable point ("zlib-rs isn't a good example of idiomatic rust performance") on its face. I'm just not sure what to say to this. What do you expect from me, here?
- deleted 2y ago[deleted]
- hitekker 2y agoFWIW, I think your opinion is accurate, particularly regarding digressions. It's a common debate tactic for hyping a language under the thin veneer of technical discussion.
- solidsnack9000 2y agoIt seems like you're saying this thread is not constructive or not on topic. What could I have responded with that might have been better?