Jeff-Mott-OR
Jeff-Mott-OR
> But does that mean JavaScript actually has classes? Plain and simple: No. ... the classes you have in other languages are not like the "classes" you're faking in JS....
Normally, I might do something like this (using calc just for example): ``` require('child_process').exec('calc', function (error, stdout, stderr) { console.log('stdout: ' + stdout); console.log('stderr: ' + stderr); if (error !==...
_All_ the notes on [composition](https://github.com/8483/notes/blob/master/topics/oop.md) are wrong. More details in [this reddit thread](https://www.reddit.com/r/javascript/comments/b67az3/javascript_inheritance_vs_composition/). This unfortunately is a bit of misinformation that has been spreading through the JavaScript community like a...
Minor detail, but it bugs me. They aren’t called “functional” components (like the paradigm); they’re called “function” components (because they’re made from plain JavaScript functions). Admittedly most folks and blogs...
Lines such as "less like inheritance and more like delegation", which is the premise behind these few paragraphs, are misleading and inaccurate. Delegation and inheritance are not either/or concepts. Delegation...
When you call a method, it starts at the top of the class hierarchy and works down. A superclass method wins over a subclass method. In order to get to...
Only methods on the class can access the raw fields.
Members on a class that look like field reads and writes but that actually execute user-defined code.
Hint: Make LoxClass extend LoxInstance and go from there.