On Thu, Nov 10, 2005 at 03:50:42PM -0500, Cortlandt Winters wrote: > Here's an example (though not perfect). The iterator pattern, taken from the > book, fills a dozen pages of description, half a dozen classes, each with 30 > lines of code just to create the structure. Why? To iterate over two menus > with a different underlying item types. In ML there is a function called Map > that is built in to do this for you. You don't need to create half a dozen > files for your interfaces, subtypes and instances, it's built into the style > and structure of the language so that it's just not that verbose or complex. > The same thing is going on, but in one language it's handled transparently > and in the other you implement it with a verbose syntax and a pattern. Over > and over you see this with Java and Java type patterns and in the end it > becomes kind of funny, but only to those who have seen the comparable > programs in different languages.
You are possibly being a little unfair in comparing external iterators with internal iterators; each has strengths and weaknesses. That Java has traditionally lacked a succinct standard for expressing internal iterators is obviously silly though. dave -- http://david.holroyd.me.uk/ _______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
