News for hackers. Stuff that matters.
Re:When are enums not a code smell? by echelon on Monday November 22, 2021 @09:56AM (#29306914)
I'm going to flag this submission. This is horrible Stack Overflow post with bad answers.

Languages have different types of "enums". Enums in languages like Rust are extraordinarily powerful sum types that create compact memory footprints, strong compile time guarantees, and can form the basis of expressive and correct state machines.

Enums (sum types) are one of the best patterns.

Re:When are enums not a code smell? by chunkyfunky on Tuesday November 23, 2021 @04:37AM (#29316094)
I would have thought the tags on the question make it pretty clear it isn't dealing with languages like Rust.
Re:When are enums not a code smell? by couchand on Monday November 22, 2021 @10:11AM (#29307105)
That's not what flagging is for?
Re:When are enums not a code smell? by echelon on Monday November 22, 2021 @10:23AM (#29307283)
This is really bad advice.

While the commentary in this HN thread is good, those that click the link directly and don't know any better will be misinformed.

I seems bad to let this stay on the front page.

Re:When are enums not a code smell? by couchand on Monday November 22, 2021 @11:03AM (#29307861)
Then downvote. Flagging an article you simply disagree with wastes the moderation team's time.
Re:When are enums not a code smell? by gary_0 on Monday November 22, 2021 @11:25AM (#29308136)
You can't downvote submissions on HN.

From https://news.ycombinator.com/item?id=24123981 user 'pwg' says:

> Flagging is the closest to a "dislike" option available. But it is suggested to use it for items that are off topic.

> The better way to make sure items you find to be "positive" make the front page is to upvote everything you think deserves to get there. Upvote the positive, ignore the negative, and the negative will fade from view.

Officially, there's https://news.ycombinator.com/newsfaq.html but I wish it went into more detail about what the HN norms are regarding upvoting/downvoting/flagging.