DEV Community

Discussion on: The scientific proof of that OOP is a mass psychosis

Collapse
 
peerreynders profile image
peerreynders

C++ is a systems level language - Hyperlambda isn't. Given that Hyperlambda is a higher level language (as most FP languages are) one would expect it to be less verbose than C++.

Lisp as an Alternative to Java (Peter Norvig):

"I wrote my version in Lisp. It took me about 2 hours (compared to a range of 2 to 8.5 hours for the other Lisp programmers in the study, 3 to 25 for C/C++ and 4 to 63 for Java) and I ended up with 45 non-comment non-blank lines (compared with a range of 51 to 182 for Lisp, and 107 to 614 for the other languages). (That means that some Java programmer was spending 13 lines and 84 minutes to provide the functionality of each line of my Lisp program.)"

Norvig's piece tends to give the impression that fewer lines will be always be written faster. But all it really shows is that Norvig and his fellow lispers are extremely adept at wielding their language of choice.

I would hypothesize that in fact many (not all) of those Java Programmers, even after being trained in Lisp, would still take their 4 to 63 hours and write the Lisp code without arriving at a terse solution (taking additional time to compact it).

A better comparison would be between C++ and Rust. While Rust is imperative it isn't Object-Oriented and is largely expression based which allows all sorts of tactics that were inspired by functional programming languages. However having to satisfy the borrow checker can lead to more verbose code, nothing to say about the time required to "fight it"—likely leading to the comparison turning out inconclusive. Of course that kind of comparison wouldn't be useful in promoting Hyperlambda.