4 ms·
This sunk cost fallacy argument is easy to apply to many languages. Of the ones for which I've approached expert-level knowledge, C++ stands out as the one wit
by jasone 7y ago
This sunk cost fallacy argument is easy to apply to many languages. Of the ones for which I've approached expert-level knowledge, C++ stands out as the one with the biggest sunk cost for the least gain. But let me tell you about my experience over the past couple years with OCaml, and why I think experts of Haskell, ML, and related languages are motivated by epiphany rather than sunk cost.
First, my CS background. I started programming in 1991, and have used dozens of languages major and minor over that time. At one time or another, I developed especially deep knowledge of the following: C, Perl, PostScript, Python, C++, and PHP. Functional languages always hovered at the edge of my interest, but never seemed practical enough to apply to the sorts of systems programming I love.
In 2017 I decided to spend some time broadening my understanding of language concepts, and made a list of languages to learn more about: OCaml, Julia, Clojure, Scala, Scheme, Haskell, Rust, Erlang, Go, Swift, and Kotlin. Learning OCaml ended up being such a transformative experience that I use it almost exclusively now. As an aside, I must say that it wasn't easy; it took the better part of a year to acquire the knowledge and experience necessary to feel productive.
Why is OCaml (and presumably Haskell) so good? The resulting programs feel like beautiful self-consistent crystalline structures rather than balls of mud. Furthermore, the powerful type system allows refactoring from one crystalline structure to another such that inconsistent hybrid crystals rarely occur. This is a much different experience from reshaping a ball of mud. The routine elegance and safety of these program representations aid in discovering the essences of solutions, and I have written programs I never would have discovered in other languages.
Killer features:
- The powerful type system clarifies design, aids refactoring.
- The module system (in combination with generics) enables truly modular design.
- Effectless computation (pure functions, immutable data) simplifies reasoning about state.
I have some complaints about OCaml (and every other language I know), but it stands out as by far the most fulfilling to use. Going forward I will prefer to spend my programming time using languages more like OCaml, Haskell, Rust, etc. than those I used for the first 25 years.
- galaxyLogic 7y agoIt's not about "sunk cost". It's about making a new investment. How much would it cost to train all your programmers to be productive Haskell programmers? Is it a worthwhile investment for your company? I'm not saying it isn't but that it is a big new investment if you're planning to make that transformation. Will it pay itself back in time? Maybe, maybe not. Or are there some other investments which would seem to have a bigger and less risky rate of return?
- ernst_klim 7y ago> How much would it cost to train all your programmers to be productive Haskell programmers? Dunno about Haskell, but OCaml is way more simple than C++ or even Java. OCaml manual is 100 pages on informal tutorial + 100 pages of formal language definition. Another 200 pages are dedicated to runtime and tooling, and 400 more for the whole standard library. With Java, the language manual itself is 800 pages, and that's without the library or runtime.