People calling Rust a "general purpose language" have definitely drank way too much of it's kool-aid
Rust has one, singular main purpose - speed

Everything else (including safety!) is secondary to speed
General purpose programming sometimes has a need to be slow

Rust rejects the slow, violently, building as many barriers to it as possible
Any sufficiently complicated Rust program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half a object oriented garbage collector.
@[email protected] Segfaulting is trivial to do with Rust - just use a bit of "unsafe"

and no, saying that unsafe will of course allow you to do that is just dumb, because it's a core language feature - ergo the ability to segfault is a core language feature.
@[email protected] You could say the same about goto and it doesn't make the inclusion of goto into any current-day language any better
@[email protected] "early exit from a function with shared cleanup code at the end" is something that exceptions and "finally" blocks have solved that for literal decades in contemporary general purpose programming languages. It's only "fast" languages that haven't adopted them (or some other equivalent alternative, like a bunch of monads in functional languages).

There is truly no space for either goto or unsafe in a general purpose languages of this day
@ignaloidas @piggo i don't know what you're smoking but it makes you sound more dogmatic than Drew
@wolf480pl @[email protected] I'm just tired of the rust evangelism task force pushing the narrative that rust is this magical, new, innovative solution to making everything memory safe that we didn't have before, when it's both has holes in memory safety that are purposefully there, and has way worse ergonomics than the memory safe languages that have been around for literally decades.

@ignaloidas @piggo ok fair, Rust evangelism task force is stupid and hella annoying.

And yes, there are plenty of safe languages that are easier to use than Rust. My favourite one is Java.

However, I don't think there's an universally agreed on idea of a "general purpose programming language".

All languages have their pros and cons, and while some are just so bad we don't use then anymore, different usecases make different pros and cons important.

@wolf480pl @[email protected] Well just from the name, general purpose implies that you can use it generally - as an example, I'd put Java


It might not be the best any any one purpose, but it sure has been used for an extremely wide variety of shit, while still being (mostly) ergonomic to use with all of them.
@ignaloidas @piggo I think if you're looking for the widest variety of uses, Javascript would be hard to beat.
Even though it's a horrible language.
@wolf480pl @[email protected] While I'm fairly certain that Javascript has been utilized for micro-controllers, I doubt it has lived on ones as locked down and tiny as JavaCard is. I also am incredibly scared at a thought of Javascript running on massive mainframes.

I also haven't seen any Javascript databases, while there's quite a few that are written in Java.

It's hard to touch a field in programming where Java hasn't been used.
@ignaloidas @wolf480pl @piggo
Java and Javascript are both dogshit garbage to work in, change my mind
The whole “look, this thing is popular, it must be because it’s good” mindset sickens me.
It’s practically equal to “Eat shit, 17 billion flies can’t be wrong”

@zaki @ignaloidas @piggo
I don't think anyone here sayd JavaScript is good. I picked it as an example specifically because it's bad, despite being used in a wide variety of situations.

As for Java - I had fun coding in it, despite many of its defficiencies. I wouldn't recommend it to others outside of specific circumstances, but it's way better than JS.

@wolf480pl @ignaloidas @piggo
Amen, I can agree with that
And yeah, I understand the annoyance that is the inevitable rust shill, but at the same time I get similarly annoyed at OOP shills

“o noes, there’s no data / func hiding, oooh wehere my getter / setters at OH NOES THIS IS UNSAFE”
brah I just wanna write a function and call it on some data without wrangling 70 pages’ worth of boilerplate garbage, get fucked

@ignaloidas you know what is general purpose? A good knife and a spoon is general purpose. A programming language is as general purpose as you make it.
I’ve seen critically important software implemented in pure js in a simple .html file in script tags, or in simple C and linked into a bigger project, and I’ve seen Java and Scala used for 15 line scripts
Hell, people use Visual fucking Basic for stuff you wouldn’t believe.

Just because a language decides its priorities not according to your agenda, that doesn’t make it bad, it only means you won’t use it. Except when it’s JS. JS is bad.

t. guy who never touched rust.

@zaki @ignaloidas @piggo
I think the problem is when a language does not live up to its stated promises.

If your front page says "if you want something as fast as C and as safe as Java, use this language" and then it turns out you can't write a double-linked list in a way that's both safe and fast, you'd feel scammed, right?