|
|
|
|
|
by donatj
3783 days ago
|
|
Go's lexical scoping and first class function/method's owe a lot to JS for leading the way IMHO. That said, it's "object" system is almost the complete reverse. JS is methods with data, Go is data with methods. It's an interesting contrast. |
|
First class functions is a concept from mathematics and many programming languages had this feature way before javascript existed, and I simply don't understand exactly what concept of Go's lexical scoping resembles anything exclusive of javascript.
I don't understand the last paragraphs about methods with data and data with methods, but Go's structs resembles C's structs, binding methods to a struct is an thing I've only seen in Go, but maybe some other programming language had this before.