4 ms·
What’s missing? It has generics and robust typing. Man this website must be full of old geezers with all the go hate I see
by jekwoooooe 1y ago
What’s missing? It has generics and robust typing. Man this website must be full of old geezers with all the go hate I see
- pjmlp 1y agoMaybe some Pascal like enumerations, something like this from 1976: type weekdays = (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); DailyActivity = array weekdays of string; Instead of the ridiculous iota/const workaround. You mention generics, but actually they still are quite constrained on capabilities. Robust typing misses out on the famous gotcha with nil interfaces. The error boilerplate, but granted that isn't a typesystem issue, rather grammar and semantics. Package names tied to SCM domains, with a workaround using HTML Meta redirections when they change, and behind our back file rewrites remapping imports.
- mdaniel 1y ago> and behind our back file rewrites remapping imports. I've been bitten/misled by that so many times. How hard is it to just $(find -exec sed) to patch up the imports if you fork a project, versus later finding out oh, so that's why line 50 of some random dep doesn't at all do what it says in the repo If I was Go Dictator For Life I'd make the compiler issue a warning for any replace statement in go.mod
- kristianp 1y agoIt does make you wonder about their thought process, not using 'real' enums for go. I think the language designers were of a minimalist mindset, but Pascal wouldn't be described as bloated by anyone with a computer larger than an original Apple II (it required an add-on card to run UCSD Pascal).