29 Jan 2005 08:35
Re: [groovy-dev] Diff of Java and Groovy grammars
Marc Hedlund wrote: > On Tue, 25 Jan 2005, Mike Spille wrote: > >> - All this work the grammar is doing trying to figure out Groovy >>is the same work that a human will have to do to understand the language. > > > I think this is a great comment. > > You can save time by typing less characters; you can save time by not > having to look at the manual to figure out how a language feature works. > Sounds like we're trading one for the other in too many places. Thats a great point and I totally agree. We do need to be careful about too much syntax sugar / brevity making things confusing. For me the main value of Groovy is expressiveness & power - not saving keystrokes at all cost. Though also its worth saying that a really simple rule for developers to understand like "Groovy doesn't need semicolons, unless you wanna separate multiple statements on a single line - otherwise they are silently ignored" is pretty easy to grok & use - folks do this quite naturally in shell scripting, JavaScript, Ruby etc. However this simple change could result in a fairly large diff comparing the Groovy grammar to Java. So it does not imply that because the grammar has lots of changes to it, that its gonna be hard to understand. i.e. a larger Antlr file & more diffs to the Java grammar do not imply a harder to understand language. i.e. counting the number of lines of the diff of Groovy v Java is not that interesting by itself; its much better to consider the real semantic differences in the grammar James
RSS Feed