Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I never liked the concept of struct tags, it's a kind of stringly typed programming where the meaning of X or - depends entirely on what the json package says it means.

An alternative is to introduce something like annotations, but I'm sure there will be resistance as it makes the language lean closer to e.g. Java.

But my take on that is that if you want stricter typing like that, you should actually go to Java or C# or whatever.



"Stringly typed programming" is the phrase I was looking for. It's the equivalent of a shrug from the programming language designer: "I don't know what to do about that, so I'll just add a magic string and let someone else figure it out."

That and one or two other examples in the article smelled vaguely of PHP to me: features piled up in response to immediate needs instead of coherent design. For a language that famously refused to add generics for years (then did them badly, IMHO), it seems off-brand.


Java resisted first party support of annotations. It was a very controversial addition in the early 2000s

Support for the types of metaprogramming/metadata that annotations are used for is a useful attribute of languages in general




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: