312
I love Rust (lemmy.blahaj.zone)
submitted 1 month ago by rustyfemboy to c/programmerhumor@lemmy.ml
(page 2) 26 comments
sorted by: hot top controversial new old
[-] PeriodicallyPedantic@lemmy.ca 3 points 1 month ago

I mean, if your IDE does it for you, is it really that much better that it's shorter?

[-] ReversalHatchery@beehaw.org 1 points 1 month ago

not the IDE, its the compiler. this is also not some AI shit, in many cases (not all) the compiler can actually figure out how to do this, because it's not hard, it would just be a lot of boilerplate if written manually.

[-] PeriodicallyPedantic@lemmy.ca 2 points 1 month ago

Why did you even bring up AI? IDEs have been able to generate equality functions for decades without AI.

It's kinda neat to have this defined directly in the language so that compilers can implement it, but creating equality function is so low effort that this doesn't really seem like a big deal.

Like, you define the members in a class, then you tell your IDE to generate getters, constructor, equals, hashcode, etc all in like 5 seconds.
I like it, it's nice when the language itself defines reasonable defaults for things, but realistically you're saving yourself a few seconds of effort.

[-] ReversalHatchery@beehaw.org 2 points 1 month ago* (last edited 1 month ago)

I thought you were thinking an AI based code generator klike copilot) does it, when you said the IDE does it.

username checks out /s

[-] PeriodicallyPedantic@lemmy.ca 2 points 1 month ago

Yeah, I picked that username for a reason 😭

load more comments (6 replies)
[-] yogthos@lemmy.ml 3 points 1 month ago

In Clojure equality checks are done by value as the default, and all the data is represented using a set of common data structures.

[-] flashgnash@lemm.ee 1 points 1 month ago* (last edited 1 month ago)

I've found rust generally to be far more writing than all other languages I've used

load more comments
view more: ‹ prev next ›
this post was submitted on 15 Nov 2024
312 points (100.0% liked)

Programmer Humor

32715 readers
608 users here now

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

Rules:

founded 5 years ago
MODERATORS