4 ms·
> Eagerly evaluated functional languages are quite normal. Probably not very efficient. Are there commercially successful examples of such a language? > An im
by petilon 5y ago
> Eagerly evaluated functional languages are quite normal.
Probably not very efficient. Are there commercially successful examples of such a language?
> An imperative language could use lazy evaluation as well
Certainly! I believe Microsoft's Linq is one such example.
- duped 5y ago> Probably not very efficient. Are there commercially successful examples of such a language? Global lazy evaluation by default is the exception, not the norm. Standard ML, F#, OCaml, Scala, ... I actually would have more trouble finding a classic "functional" language that is lazy like Haskell but isn't Haskell. Not to mention, almost all the multiparadigm languages that can utilize FP like C++, Rust, etc are eager.
- petilon 5y agoRust does lazy eval.
- duped 5y agoExpressions in Rust are eagerly evaluated, but you can write lazily evaluated things without issue.
- bidirectional 5y agoBasically every language has some kind of opt-in lazy evaluation, Rust is strict by default as is basically every remotely mainstream language bar Haskell.