3 ms·
Interesting! I agree entirely that Java and OO leave a lot of room for developer to go astray. And I've enjoyed my limited coding in functional languages. But i
by wpietri 11y ago
Interesting! I agree entirely that Java and OO leave a lot of room for developer to go astray. And I've enjoyed my limited coding in functional languages. But is something like F# really better in practice?
I ask because every functional-language code base I've been able to look at myself has two advantages: 1) it's not very large, and 2) it was made by very smart, experienced developers with a passion for functional languages. When I look at similarly sized OO code bases produced by people with similar levels of passion and expertise, the code base is also very good.
The terrible Java code I've seen, on the other hand, mostly comes from less experienced people whose priorities are things like "keep boss happy", "put in all required hours", and "comply with project plan". Which is, sadly, the average case in the industry.
So I'm wondering: What happens if some functional language becomes mainstream? Will junior programmers at EnormoBank's latest death march produce better software?
- iopq 11y agoIf Haskell becomes mainstream, there will be some absolutely horrifying Haskell code. But Haskell allows people who know what they're doing to also check that their code doesn't violate certain constraints. That means that the amount of work the compiler does is greater, which makes more guarantees about correctness. It's not about making the worst code less bad, it's about making the median project take less time and have less defects.
- tinco 11y agoThere already is some very horrifying Haskell code written by masters of the language. Well written Haskell in my opinion can be readily understood by anyone who has studied the language for a week or two (provided they are experienced programmers). The depth of potential for abstraction in Haskell is so tempting however that often clarity is lost in dense semantics.