> > Suggestions? Other languages to look at? > > I like Scala's for loop syntax because it's technically a list comprehension, but it has syntax that is familiar for imperative programmers. It does actually apply its block as a closure to each (filtered) item in the list, so it can filter and generate new types just like a list comprehension, but it has the ability to return Unit (void) as well. So it can be used in both a functional and imperative style.
It also has the ability to operate on any Iterable, which means that it will work on generators or other lazy/infinite lists. That said, I almost always tend to use the builtin methods of scala's collection classes such as map, flatMap and foreach. http://www.scala-lang.org/node/111 http://www.codecommit.com/blog/scala/infinite-lists-for-the-finitely-patient
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
