3 ms·
You shouldn't analyse programming constructs based on their implementation in my opinion. Go down deep enough in the rabbit whole, and you'll see everything is
by didibus 6y ago
You shouldn't analyse programming constructs based on their implementation in my opinion. Go down deep enough in the rabbit whole, and you'll see everything is just a Turing machine.
A more useful analysis in my opinion is to focus on the developer ergonomics of the language. That includes how the construct is used or can be used, any properties it exhibits or guarantees, what it prevents you from doing, etc.
From that lens, the ergonomics of a Class and a Function Closure are not at all the same.