SLC: remove Stream from default imports

Stream is deprecated, users should use LazyList instead (or “LazyListIterable :grimacing:” to be capture safe)

No need to delete the class, but it should require an explicit import IMO.

6 Likes

First time I hear of LazyListIterable! I just read the documentation, but it doesn’t seem to explain the difference with LazyList. It does point to a general discussion of Collections, which mentions LazyList but not LazyListIteratble. What is it exactly?

I like it. It leads to confusing errors when you e. g. copy fs2-based Stream code to another file and the compiler says something about wrong number of type parameters. If we remove Stream, you get a straight error from the compiler and your editor can help you find the right import.

1 Like

Well for capture checking to be easy to annotate the library with then it requires Seq to not be lazy, so LazyListIterable is identical to LazyList except it does not extend Seq and so is capture checked correctly. (LazyList is not compiled under capture checking mode so it isnt checked)