Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Go never should have implemented closures.

You add them and the next thing people want are objects.



All you really need in an language is the former - closures provide encapsulation (instance variables become bound variables) and polymorphism (over closures with the same function signature) all the same


And soon enough you get what Javascript ended up with, a half-baked implementation of classes and OOP.

Go has structs and functions that work on those structs, good enough for me.


Same as Python.

It could have been based on tuples and records (similar to SQL), but we somehow got typeless OOP.

Wasted opportunity.




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

Search: