http://qs1969.pair.com?node_id=234117


in reply to "Perl Idioms for Java" Underway at Sourceforge.net

A great Perlism to try and implement is its syntactic sugar and any effort along those lines (for me at least) is a welcome effort.

However, after looking at your code I wonder how useful some of your idioms (specifically your implementation of foreach) are compared to that of generics which is slated for 1.5?

Given that not many people would upgrade to 1.5 right away I think I've kind of answered my own question :).

I was also wondering about your class structure. The *accepted* method would be some form of delegate object but one that conforms to an interface. That said, the STRATEGY pattern here would surely have helped tremendously? You could still use your base Block() class but then subclassed it for each Perl idiom.

A final point/question, are you expecting the user of your API to undertake all the Thread handling? There are areas where I can see you're going to have problems unless you make this absolutely clear.

I do have more points but they are more related to Java than Perl which I think is a little *too* OT :).

Please don't get me wrong - this is interesing work :).

Update: made a boo boo - thought you weren't using anonymous classes when I think you are. Still nm :)

The stuff about anonymous classes.