Hacker News new | ask | show | jobs
by djur 3916 days ago
Plenty of functional languages do not have lazy sequences by default. Haskell does because the entire language is lazy by default, and Clojure does as a conscious design decision (one that is not shared by its Lisp, Smalltalk, Ruby, and ML influences). There are plenty of hardcore functional programmers who will argue that strict by default and lazy by choice is the preferable option.

The reason Kotlin sequence operations aren't lazy by default is probably because Java collections aren't, and Kotlin code is going to spend a lot of time dealing with Java collections. And, frankly, it's always a tradeoff to implement lazy collections in a strict language -- people using them need to become intimately aware of exactly which operations are lazy and which are eager.