3 ms·
Funny the choice of laziness as an example of functional superiority. First, functional != lazy evaluation. We can once again thank the Haskell converts for f
by zzalpha 10y ago
Funny the choice of laziness as an example of functional superiority.
First, functional != lazy evaluation. We can once again thank the Haskell converts for further trying to redefine what "functional" means to match Haskell's featureset (which began with purity... I'm waiting for Hindley-Milner to gradually become a requirement).
In fact, laziness in the context of OOP is a very natural fit as the paradigm encourages encapsulation and state hiding. Build the right interface (basically one that looks like consuming items from a stream) and you could swap out approaches largely at will.
Second, laziness is the source for a huge number of performance issues in Haskell. Show me a high performance Haskell program and I'll show you one whose developer probably banged their head against a space leak and found themselves littering !'s throughout their code.