4 ms·
Go never should have implemented closures. You add them and the next thing people want are objects.
by wheelerof4te 3y ago
Go never should have implemented closures.
You add them and the next thing people want are objects.
- bagful 3y agoAll 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
- Cthulhu_ 3y agoAnd 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.
- wheelerof4te 3y agoSame as Python. It could have been based on tuples and records (similar to SQL), but we somehow got typeless OOP. Wasted opportunity.