Rust
-
I am convinced Rust haters are simply refusing to learn something new, consciously or not.
I don't like rust because I'm too stupid to understand it
-
not yet
evil maniac laughter
-
Be careful, a Rust Dev will accuse you of FUDposting! They might even try to collect evidence on you for being "a terrible person", then sending their followers after you, then individually contact all your publicly known friends about it!
Okay, Christoph Hellwig.
-
Okay, Christoph Hellwig.
Sorry, but Rust is still just as much a "not a functional programming language" as Java is "not an object oriented programming language"...
-
Where would you say Rust isn't the right solution?
We always hear how great Rust is, but I'd be curious to know where it isn't.
We always hear how great Rust is, but I’d be curious to know where it isn’t.
-
In any project that's sufficiently advanced and written in any other language. You don't simply do a rewrite of 100k+ LOC just because you want to use Rust.
-
Somewhere where you'd rather use a scripting language like Python. I.e., rapid prototyping or gluing together some infra components.
-
A situation where your team's expertise is in some other language.
-
A situation where a library/framework is native/only available for a certain language.
Few of these are strictly technical requirements. It's obvious that you can use almost any language to do almost anything, including Rust, if that's what you prefer. However, the context matters in the real world.
All this being said, I wish I had a chance to write Rust professionally. It's a neat language.
-
-
We always hear how great Rust is, but I’d be curious to know where it isn’t.
-
In any project that's sufficiently advanced and written in any other language. You don't simply do a rewrite of 100k+ LOC just because you want to use Rust.
-
Somewhere where you'd rather use a scripting language like Python. I.e., rapid prototyping or gluing together some infra components.
-
A situation where your team's expertise is in some other language.
-
A situation where a library/framework is native/only available for a certain language.
Few of these are strictly technical requirements. It's obvious that you can use almost any language to do almost anything, including Rust, if that's what you prefer. However, the context matters in the real world.
All this being said, I wish I had a chance to write Rust professionally. It's a neat language.
Lots of your point apply to any language it seems. I should have specified new projects I guess.
But the points you've made are good nonetheless
-
-
Rust [...] could use a higher level scripting language, or integrate an existing one, I guess.
One approach is to use more macros. These are still rooted in the core Rust language, so they give up none of the compile-time checks required for stability. The tradeoff is more complex debugging, as it's tough to implement a macro without side effects and enough compile-time feedback that you'd expect from a DSL.
Another is to, as you suggest, embed something. For example, Rust has Lua bindings. One could also turn things inside out and refactor the rust program (or large portions of it) as a Python module.
Are Rust macros akin to the C macros? Basically an inline replacement of a code section?
-
Are Rust macros akin to the C macros? Basically an inline replacement of a code section?
wrote last edited by [email protected]Kind of. They do center on code generation, at the end of the day. That's where the similarities end. You can't insert macros into your code arbitrarily, nor can you generate arbitrary text as an output. Rust macros take parsed tokens as input, and generated (valid) code as output. They must also be used as annotations or similar to function calls, depending on how they're written. The limitations can be frustrating at times, but you also never have to deal with brain-breaking
#define
shenanigans either.That said, I've seen some brilliant stuff. A useful pattern is to have a macro span a swath of code, where the macro adds new/additional capabilities to vanilla Rust code. For example, here's a parser expression grammar (PEG) implemented that way: https://github.com/kevinmehall/rust-peg
-
I like how this takes familiarity with the original xkcd comic as a given.
I think half of Lemmy knows most of XKCD
-
I am convinced Rust haters are simply refusing to learn something new, consciously or not.
“Everyone is gunning for you when you're at the top!”
~ someone, after CE