4 ms·
JS had first class functions from the beginning, which I think is one of the major things necessary for FP. Compare that with a language like Java, which did no
by leshow 9y ago
JS had first class functions from the beginning, which I think is one of the major things necessary for FP. Compare that with a language like Java, which did not, and I think still doesn't (lambda's aren't quite the same).
JS doesn't really support traditional inheritance either, so describing it as OO seems odd to me.
- jerf 9y agoI consider anything that binds data to methods and has a concept of "data.method()" to be OO. In the OO religion I'm an ecumenicist. And even within my ecumenicalism, I consider inheritance in the strictly C++/Java sense of relatively little importance, and dropping. Rather than being essential, it turns out to have been accidental, and also arguably a mistake, even on purely OO grounds.
- leshow 9y agoThat's a silly distinction. It's also wrong. Rust 'binds data to methods and has a concept of "data.method()"' and is not OO by any meaningful definition. It's simply sugar for Trait::method(&data).