3 ms·
I disagree with the concept of "blessed" syntax in the first place. I want users to write libraries just as powerful as the standard library.
by iopq 10y ago
I disagree with the concept of "blessed" syntax in the first place. I want users to write libraries just as powerful as the standard library.
- weberc2 10y agoPhilosophically, I agree. Pragmatically, generics seem to tempt programmers into writing really weird code in pursuit of some purist notions of terseness or reusability. After having used Go as well as lots of languages with generics, I will say that most Go programmers write very similar code for very similar problems, and it does make it easier for programmers to understand each other's code. There are a few times that user-defined generics would be handy, but those times are really very rare and I'm not convinced that adding generics to the language would be a net positive. In fact, I think the case for algebraic data types is stronger than the case for generics.
- iopq 10y agoI think algebraic data types and not having nil would be a huge improvement to Go. I would agree with you about generics if Go had a good macro or templating system. Having to generate code feels a bit silly.
- Filligree 10y agoI need a tree. Sorted lg(n) structures are incredibly useful, and maps aren't sorted, but as it stands I can't have one without risking runtime type errors. Static typing that doesn't cover common use-cases is worse then useless. It gets in your way.
- weberc2 10y ago> I need a tree. Sorted lg(n) structures are incredibly useful, and maps aren't sorted, but as it stands I can't have one without risking runtime type errors. I agree. See my previous comments. > Static typing that doesn't cover common use-cases is worse then useless. It gets in your way. I agree. Fortunately Go's static typing covers the most common use cases. If your primary deliverable is typesafe tree algorithms, Go might not be for you.