OCsite: > As a matter of fact, you can. This darned Java "method- > calling" lingo is terribly misleading;
It is not the Java lingo, but the standard and most intuitive teminology. > we definitely should have sticked with Alan Kay's > "message-sending", and there would be much less > misunderstandings and problems today. I fear this message-passing approach even further from normal proceudural prgramming that conventinal OO languages and would therefore be even more confusing and unintuitive. > Anyway, Groovy (just like any other at least half-decent > language) supports late-binding, which means you can > essentially "call" anything of anything, and the > dispatcher at the runtime would do its best to find the > proper method and call it. Why do you think a decent language should support late binding? Some of the most decend languages that I know -- Pascal and Modula -- do not have it. They exemplify a great compromise between human intuitiveness and closeness to the hardware. Ivoking proceudres and passing strongly type values to them is a very simple and clear concept, reflecting the human's way of thinking about separting a difficult task into many simple ones. > Try e.g., > > class Foo { > static foo0() { println "foo0"} > static foo1() { println "foo1"} > } > Foo.metaClass.static."foo${1+1}"={ -> println "even this works OK!" } > 3.times { Foo."foo$it"() } This is black magic to me. I will try to stick with the simple procedurla approach with Groovy as well as I can. > The problem with the original code > [...] Thank for helping Mariusz. Can you please forward your reply to his address? I do not see his address neither via Gmane nor via the mailing-list archive.