3 ms·
Well, they got (at least) one thing exactly right: Doing away with the "toolchain". Having one command that can figure out how to build your code, including dow
by TylerE 15y ago
Well, they got (at least) one thing exactly right: Doing away with the "toolchain". Having one command that can figure out how to build your code, including downloading external dependencies, is really nice.
Pity about the whole "not having generics" thing though.
- johnpmayer 15y agoWith interfaces, it's pretty simple to replicate patterns like a Container<Comparable> or Channel<Reader>, to borrow common Java syntax. Personally, I like how it forces you to think about parametricity whenever you want polymorphism, like most functional languages.
- TylerE 15y agoBut, unless I'm missing something, it's missing the supporting bits you get in a nice functional language, like algebraic datatypes and pattern matching, which make that style much more pleasant. Of course, most of the functional language DO have generics, and full type inference to boot, also.
- EdiX 15y agoThe ML language family does, other functional languages (the LISP family, Erlang) don't.
- TylerE 15y agoArguably lisp doesn't NEED generics since unless you go around setting lots of type pragmas, the typing system generally doesn't intrude. So, in other words, Lisp doesn't have generics in the same way Python doesn't have generics.
- deleted 15y ago[deleted]
- ootachi 15y agoUp until the point you want to return an object from your container, sure. Then you have to return a Comparable and the user has to downcast it into the right object. Plus, you pay the overhead of boxing.
- jesstaa 15y agoApparently there is a generics prototype in the works, it was too much of a big change for Go1. It will probably be in Go2.