Dmitry Leskov

Scala Stream Hygiene III: Scalaz EphemeralStream Fills Quite A Canyon

Scalaz, an open-source pure functional programming library for Scala, provides the EphemeralStream class that does not exhibit the memory leak issues inherent to the standard scala Stream. However, it carries its own set of problems: memory overheads, performance penalties, and application disk footprint increase.

Scala Stream Hygiene II: HotSpot Kicks In

Infinite Scala streams should be marked “not for production use”, even though you can get away with breaking most of the rules listed in Part I.

Scala Stream Hygiene I: Avoiding Memory Leaks

The standard Scala Stream class is essentially a lazy List with memoization. However, memoization is undesirable when defining infinite data structures. It is possible to avoid memoization of streams by following a set of five rules, described in this first post in a 3-part series.