|
|
|
|
|
by PH95VuimJjqBqy
883 days ago
|
|
saying the words "I'm not sure what you mean" doesn't give you a pass to speak with authority about the effort involved in getting the class keyword into javascript when you're ignorant of the history. ---- edit: But also, let me point something out. what you're calling "awkwardness with classes" is incorrect. they were _functions_ that you could attach state to, some of that state could, itself, be callable functions. That's a large part of _why_ javascript has prototype inheritance. javascript was primarily functional with some features that allowed a bit of OOP sprinkled in. |
|
To be extra direct there: I didn't say the effort was small, I said that change was small. You can have a big effort for a small change. So you definitely misread me there.
But when you talked about "hammering" it into a more OOP language, I thought you were talking about big changes or many changes.
> what you're calling "awkwardness with classes" is incorrect. they were _functions_ that you could attach state to, some of that state could, itself, be callable functions. That's a large part of _why_ javascript has prototype inheritance.
Does it matter if the "class" itself is a function or an object or something else entirely? It makes thingies that have the prototype applied and you can do .foo on.
But classes you make with the keyword are still functions, aren't they? So what's the big betrayal?