this post was submitted on 15 May 2024
404 points (96.8% liked)

Programmer Humor

32557 readers
433 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

cross-posted from: https://lemmy.zip/post/15495372

you are viewing a single comment's thread
view the rest of the comments
[–] UnRelatedBurner@sh.itjust.works 4 points 6 months ago (1 children)

Isn't that the point? It doesn't let you write bad code, thus when you did manage to get something compiled it's close to C speed. Also I kinda like that it tells me ebery lil mistake, it reminds me when I forgot to delete/change something

[–] agressivelyPassive@feddit.de 1 points 6 months ago (1 children)

Compared to Java, it makes me write the same data structures three or four times.

Just an example: if I want to be able to insert a struct via Diesel, I need to write the actual entity, an entity without the id for inserts and maybe some other structures for queries. Also, I need to write a schema file defining the DB plus an SQL statement for actually creating the needed tables.

Another example: explorative testing. Sometimes you need to disable chunks of code for testing purposes. Maybe that long running computation or a DB query, etc. Rust often forces you to write a bunch of "corrections" to make the code seem correct again.

I get that this is useful, but for my line of work, it's just a pain in the ass.

[–] UnRelatedBurner@sh.itjust.works 1 points 6 months ago

I can't relate to these, but Rust is lacking in some aspects that's no secret. That's why it barely has GUIs or object oriented coding. It's usable for both, but why would you. You don't have to use rust for what it's not ment to be used at.

it's trying it's best tho, lol. I wonder if in X years, it'll be like c++, a Frank Einstein of syntax to be usable for everything.