Hacker News with Generative AI: Enums

In Defence of TypeScript Enums (yazanalaboudi.dev)
In the past few years, there’s been a growing trend of criticizing TypeScript’s enum feature.
An ode to TypeScript enums (disintegrator.dev)
It’s official, folks. TypeScript 5.8 is out bringing with it the --erasableSyntaxOnly flag and the nail in the coffin for many of the near-primordial language features like Enums and Namespaces. Node.js v23 joined Deno and Bun in adding support for running TypeScript files withouth a build step. The one true limitation is that only files containing erasable TypeScript syntax are supported. Since Enums and Namespaces (ones holding values) violate that rule since they are transpiled to JavaScript objects.
TypeScript enums: use cases and alternatives (2ality.com)
In this blog post, we take a closer look at TypeScript enums:
Reflection in C++26: Metafunctions for Enums and Classes (modernescpp.com)
Today, I continue my journey through reflection in C++26 and play with enums and classes.
Enums in Go (dizzy.zone)