Hacker News new | past | comments | ask | show | jobs | submit login

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.




With 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.


But, 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.


The ML language family does, other functional languages (the LISP family, Erlang) don't.


Arguably 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.


Up 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.


Apparently there is a generics prototype in the works, it was too much of a big change for Go1. It will probably be in Go2.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: