2024-11-15 π programmerhumor
I love Rust
https://lemmy.blahaj.zone/pictrs/image/2742f23d-ea15-49e0-9df2-1ece86e1b0d0.webp
2024-11-17 flashgnash β edited
Iβve found rust generally to be far more writing than all other languages Iβve used
Swift: : Equatable
(assuming all the members of the struct are themselves equatable, if not the compiler will tell you to implement the == method)
2024-11-16 fishsayhelo β 1π¬
in which βother languagesβ is it so very hard?
On behalf of Java developers everywhere - thank you Project Lombok!
In Clojure equality checks are done by value as the default, and all the data is represented using a set of common data structures.
2024-11-16 BaumGeist β edited β 2π¬
Implementing Equality in Haskell:
[β¦]
deriving (Eq, Ord)
[β¦]
Iβd argue that the reason this is so bad in other languages is because of horrible default implementations.
Look at tostring in java, getting a somewhat printable object would be easy if the [β¦]
2024-11-15 ooterness β 1π¬
Now explain PartialEq, and why itβs mandatory.
Iβm much more impressed by the fact that a type can implement PartialEq and not Eq. Now thatβs nice design!
2024-11-15 PeriodicallyPedantic β 1π¬
I mean, if your IDE does it for you, is it really that much better that itβs shorter?
ββββ
ββββ