Coming from a JavaScript, Python, and Java background, these syntaxes seem very natural and unsurprising to me. And in dynamic languages, Strings as keys is incredibly common. Python’s lack of support for the auto-string-key is _super_ annoying, and JavaScript’s lack of support for the eval-as-var key is occasionally found wanting. And Groovy knows how to populate fields and bean properties, too, using this syntax. It’s actually all pretty cohesive once you get the feel.
That said, I don’t use Groovy much (for other reasons).
Leave a Reply
These pages are powered by WordPress - Some pages are language sensitive and display the content according to the language-preferences you set in your browser
Some effort is made to keep these pages clean of intrusive/viral stuff, if this succeeded: check here
September 7th, 2006 at 5:32 pm
Coming from a JavaScript, Python, and Java background, these syntaxes seem very natural and unsurprising to me. And in dynamic languages, Strings as keys is incredibly common. Python’s lack of support for the auto-string-key is _super_ annoying, and JavaScript’s lack of support for the eval-as-var key is occasionally found wanting. And Groovy knows how to populate fields and bean properties, too, using this syntax. It’s actually all pretty cohesive once you get the feel.
That said, I don’t use Groovy much (for other reasons).