[E-Lang] beginner's strategy for collections
Marc Stiegler
marcs@skyhunter.com
Thu, 29 Mar 2001 09:25:27 -0700
I had stopped giving the discussions of immutables my full attention because
I had become rather disheartened about being able to explain it all for
beginners.
So, I woke up this morning, had an obvious and embarassing realization, and
am much more mellow about it now.
E programmers will of course have a huge host of mutable collections to
choose from: all the Java collections from java.util.
I will reorganize Walnut so that I do "Interfacing to Java" before I do
"Collections". The beginning paragraph of "Collections" will remind the
reader that you can use all the standard Java stuff (except arrays, alas)
with all the convenience they have in Java; the main example in
"Interfacing" already uses Vectors. (in fact, Walnut already makes this
reference in the first paragraph. Sheesh.)
Then the entire "Collections" section can be devoted to immutables. I will
do the RaceTrack example at the end of the first chapter using java.util
collections, for familiarity. Then I will use immutables ever after. I think
this will work just fine.
--marcs