▲ | kjksf a day ago | |||||||||||||||||||||||||||||||
For some it's stupidity. For others it's brilliance. It's one of many examples of 80/20 design in Go: 80% of functionality with 20% of complexity and cost. Struct tags address an important scenario in an easy to use way. But they don't try to address other scenarios, like annotations do. They are not function tags. They're not variable tags. They are not general purpose annotations. They are annotations for struct fields and struct fields only. Are they are as powerful as annotations or macros? Of course not, not even close. Are they as complex to implement, understand, use? Also not. 80/20 design. 80% of functionality at 20% of cost. | ||||||||||||||||||||||||||||||||
▲ | Philpax a day ago | parent | next [-] | |||||||||||||||||||||||||||||||
Go's simplifications often introduce complexities elsewhere, however, as this article demonstrates with the complexities of correctness of a stringly-typed DSL. There's no free lunch here, and the compromises Go makes to achieve its outcomes have shown themselves to be error-prone in ways that were entirely predictable at design time. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | timeon a day ago | parent | prev [-] | |||||||||||||||||||||||||||||||
Starting to get feeling that 80/20 design is not good thing. Many things seems to be driven by worse is better but, looking at things like Climate Change... was it worth it? |