So my original post got more eyeballs than expected and I saw it on social media mainly hacker news, and lobste.rs to my surprise.  With varying level

Go Enums Still Suck

submited by
Style Pass
2024-03-28 10:00:03

So my original post got more eyeballs than expected and I saw it on social media mainly hacker news, and lobste.rs to my surprise. With varying levels of support for my ideas and some less than constructive comments such as and I paraphrase… ‘learn to code’, ‘why do you hate Go?’, ‘THIS ISN’T JAVA’. I love online discourse.

I will also say there was good discussion and support for what I was trying to achieve. Sometimes the Go userbase is less than receptive to critiques of the language re:Generics Before Generics, but I still find Go my most productive language to just get shit done.

The first critique is well placed and I really should have started at that point, in fact I could have forked the project and used it as the basis for my own as it even uses the AST (abstract syntax tree) approach to parsing the GO code and building up from there. The tool is even mentioned on the official go blog post when go generate was introduced after all.

I didn’t do this; In hindsight I’m an idiot for not doing this from the start, but parsing a JSON file to a struct was just so simple and I admit I was lazy. At least it proved out my idea, so I rebuilt it correctly (i hope) this second time around.

Leave a Comment