this post was submitted on 09 Sep 2026
60 points (85.7% liked)

Programmer Humor

33153 readers
410 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Endmaker@ani.social 2 points 2 hours ago (1 children)
[–] ZILtoid1991@lemmy.world 3 points 2 hours ago (2 children)

Enums in Rust are spicier unions, and Rust boosters like to paint it as the perfect way to do it, because it's the best language ever, with no faults. If you disagree, they'll try to frame you as a Lunduke fan and a bigot.

[–] RustyNova@lemmy.world 3 points 52 minutes ago

Never said that. In fact, enums have lots of issues that can add a lot of boilerplate code.

But actually having data associated with the type system instead of just a flag is a lot more powerful and less prone to errors than classic enums

You can also put functions on this union type that allows easy abstraction of what state the union is in

[–] Johanno@feddit.org 1 points 2 hours ago (1 children)

Iffind rust interesting but I don't use it enough to know anything deep about it.

All I know is that I am not made for c++.

Hell I can't keep track of pointers and scopes. And who the hell made templates?

[–] ZILtoid1991@lemmy.world 0 points 2 hours ago

Templates outside of D are a mess, and the reason why metaprogramming has a bad name. Templates inside D are easy to use, and its attempt at it is something more language should copy.