5 ms·
Can you elaborate on what (if anything) you immediately disliked about Go?
by alexatkeplar 15y ago
Can you elaborate on what (if anything) you immediately disliked about Go?
- haberman 15y agoI dislike duck typing; I much prefer to have an explicit declaration of what interfaces you are implementing. I also think the type system is too dynamic for a systems language (eg. their answer to generics requires run-time type checking for every operation). Also, just as a gut-level reaction I didn't feel excited about any of the expressiveness that Go offers (compared with my reaction to Rust's pattern matching, which to me is a clear improvement over how you'd express an equivalent thing in C or C++).
- jbarham 15y ago> their answer to generics requires run-time type checking for every operation Not quite, the Go implementation has runtime optimizations so that the cost for using interfaces/generics is incurred once at first use: http://research.swtch.com/2009/12/go-data-structures-interfaces.html http://research.swtch.com/2009/12/go-data-structures-interfa...
- ungerik 15y ago> their answer to generics requires run-time type checking for every operation Go has no built in answer to generics. Trying to rebuild generics with other language features won't make it better.
- haberman 15y agoI must have misinterpreted the intent of this from "Go for C++ Programmers": > Because the conversion is dynamic, it may be used to implement generic programming similar to templates in C++. This is done by manipulating values of the minimal interface. I thought they were saying this was their answer to generic programming, but it appears this is not the case. In any case, it was just an example of my general feeling that the type system is more dynamic than I prefer for systems languages.
- shadowmint 15y agoHi there! This is a thread about Rust. Please don't try to de-rail it with a conversation about Go.
- Nate75Sanders 15y ago- It's a sub-thread, not a reply to the original post. - The discussion is about an at-least-partially-competing/similar language. Thus, it's relevant.