>One off the top of my head that I run into all the time is in client stubs of service APIs, where a client-side enum representing a string value will break at runtime if the service adds a new string value
please learn to code first before criticizing others, if you pass client side strings as enums in your server side code without validation it's your problem, this has literally nothing to do with enums
UPDATE: I admit it HN, I am wrong, I lost the popularity contest since I have no enough voting powers, I now admit that enums are not necessary and iota are simply equivalent to enums both in type safety and readability, I mean even superior to enums, enums are superficial types injected by badly designed languages like Typescript and Rust as _synatx sugar_ for pedantic people like myself
when I stated my argument I was accused of being ad hominem, making sarcastic, content-free snarks on barely related HN posts, arguing against enums is as stupid as arguing for null pointers (which ironically exist in golang too!), it's not minimalism if you don't have enums, it's intentionally lacking an elementary feature that does exist in almost every other modern (well, in even old) language, you can argue with "deal with it" just like it was the case with package management, error handling and many other features, that wouldn't be as bad as derailing the argument to "enums are not necessary"
also, I feel strong about getting rid of cancer, should I write a treatise about the importance of getting rid of cancer since you may consider that not very important too?
I didn't mean the C example to be applied in C compilers, I meant having the first example in Golang itself, enums are not just constants, they are type safe constants, you can't just use any other constants in some switch-case and get away with it, that's the raison d'etre of enums in the first place
I didn't know that enums are so controversial, unnecessary and equivalent to just constants, but maybe a look of how it's done in any other language can give you a clear difference between enums and constants
It's hard to argue with someone who sees these 2 examples are the SAME thing, if you really see the 2nd example is equivalent in _SAFETY_ and readability as the first one, you probably haven't written much code or used many languages
In every other language, people keep arguing about advanced features, moving forward and such, only in Go people defend the undefendable and reject any kind of the simplest obvious improvements, I say so and I am sad because I use Golang very heavily, it's sad to see a modern language so popular and its core designers are still stubborn about doing anything in the right direction even if it is as simple as adding enums
Still waiting for the support enums before seeing my first grandchild, I understand it's a very disruptive feature that may take tens of MIT PhD. graduates and hundreds of millions of dollars of funding, but having an enum in any language is necessary in 21st century, I am not talking of having featureful kind of enums like in Rust, just C-tier enums would be great
that wasn't even the point of my comment, you're insisting on derailing my argument and reducing it to something I cannot verify, and seriosuly, wtf do you think HN users are? housewives or wall street bankers? HN is an online community for tech workers especially software engineers, insisting on giving the evidence that 99% exactly of the users are software engineers is childish to say the least
>I've recently moved away from Google to DuckDuckGo
here we go, the entire post was made just for this to derail the entire discussion into a free marketing/shilling for an even much worse search engine with aggressive online marketing techniques
I know that this post is about bashing Google since it's the big _evil_ boy and then slowly promoting DuckDuckGo since we are used to at least a weekly DDG shilling thread here in HN, but let me tell you the honest truth that Google is still the best search engine by far (e.g. indexing javascript content, accuracy based on your history for instance try searching "Prometheus" if you're a developer and again on not logged in account with another IP), the only other sea rch engine that comes close is Yandex especially for images. Nothing wrong if you like using DDG with for worse results accuracy and a fake sense of privacy if that's what you want, but please respect our intelligence here since 99% users of this website are software engineers and you know that DDG can't beat technically Google by any means.
I guess it depends on the category, for something like a database it can be easy to charge money (e.g. managed instances, charging cloud vendors, etc...) but something like frontend javascript framework it's almost impossible to do that
https://www.wqxr.org/ is one of the best classical music websites. Also https://classicalmusiconly.com/ is recommended and was featured once here in HN. Both are totally awesome for any classical music lover.
Golang is awesome once you submit and accept its intentionally mediocre design as a work of mysteriously genius simplicity. I did that myself and now I love it.
kinda funny that UAE and Saudi Arabia have always had blatant human rights abuses including funding terrorism in places like Syria but nobody raise a brow until they isolated Qatar roughly 2 years ago, then suddenly the abuses are appearing out of nowhere and ironically Qatar is is the only country that's worse than both of them. Also never underestimate Qatar's sleeping Islamist cells pretending to be liberals and even SJWs in the major news media nowadays
in an era where the internet is controlled by a handful of internet monopoly businesses and where any fun can easily be seen as offense by someone somewhere, then fun has to disappear or relabeled to not hurt businesses sole raison d'etre which is profit. It's not 2007 anymore, sadly.
DDG has the most aggressive and adversarial marketing by an internet company I've ever seen that's only matched in intensity by Brave browser's company. Is Gabriel trying to sell before the end of the business cycle?