4 ms·
Picture several thousand lines of C++ being reduced to 27 lines of Clojure and you get an idea. That's not to say that you couldn't do something similar in C++
by watmough 15y ago
Picture several thousand lines of C++ being reduced to 27 lines of Clojure and you get an idea.
That's not to say that you couldn't do something similar in C++, but I've met like 4 really really good C++ programmers in about 15 years of programming, so no, it's unlikely to happen.
- minikomi 15y agoWhat sort of tasks would make such a drastic reduction possible? Genuinely curious, having never written c++.
- fleitz 15y agoHigher-order functions. It's like the difference between calculus and arithmetic. If you're adding numbers together you're not going to see much difference. If you try to send a man to the moon... it's going to be a lot less code in a higher level language.
- watmough 15y agoImagine merging thousands or millions of records into disparate timelines by various attributes, merging similar records, or overwriting, changing lengths... This is the sort of stuff that filter/map/reduce is really really good at, but also, it can be important code that people will pay you a lot of money to write over a longer period of time....