soabase / soabase-halva

Idiomatic Scala ... in Java
https://github.com/soabase/soabase-halva/blob/master/README.md
Apache License 2.0
81 stars 5 forks source link

Have simpler Consable<T> interface? #28

Closed Alex-At-Home closed 8 years ago

Alex-At-Home commented 8 years ago

And then ConsList<T> extends List<T>, Consable<T>, and all your internal logic that currently depends on ConsList can depend on Consable instead.

This leaves library users free to write their own list implementations (inheriting from Consable but not List), important since Java doesn't really have a workable immutable list implementation (but eg Functional Java does, even though it can't be used easily because of its abstract construction, annoying)

(Consable just needs head/tail in your internal logic I think? Doesn't need either Iterable or concat?)