I’ve learned in my journey through life that it’s far easier to criticize than it is to critique. Criticism is adversarial while a critique is neutral. Misanthropic web sites like The Daily WTF use criticism as crass entertainment (I admit, I’ve had a chuckle or two there, but I’ve almost always felt guilty about it later) rather than as a tool to help improve the code base.
I am, however, still learning to make the distinction. When I posted Has JSR Derailed Groovy?, I intended it as critique. I had never heard of James Strachan until after I read his reply, but his defensive posture provoked a thought that maybe my tone was overly harsh.
I was relieved in a way, then, to read Mike Spille’s, Groovy Ambiguities, Optional Elements, and Syntax Shortcuts Considered Sucky. His cynical, spiteful tone makes my post look like love poetry. Mr. Strachan, I admire your thick skin.
Maybe it’s more “fun” to read as written but Mr. Spille’s venom overshadows his concerns, which were valid at the time (his post is dated 28-Mar-2004) and maybe are still. I agree ambiguities such as optional semi-colons, return statement, and vertical white space complicate the parser and increase defect probability. I disagree with Mr. Spille’s solutions but I won’t disparage him personally, as he does by labeling minimalists as “extremists,” among many other citable examples. Rather than imply Mr. Spille arguments are invalid because he consistently demonstrates his ignorance by misusing “alot,” which is not a word, I suggest he read Ken Arnold’s, Style is Substance, which elegantly proposes meaningful white space. (Did I just criticize in the guise of critique? 8-| )
Winnowing out his cynicism, Mr. Spille’s thesis is this: there are problems with the parser/compiler that should be solved by making Groovy syntax more Java-like. This is reasonable since a stated Groovy goal is to provide
an agile dynamic language for the Java 2 Platform that has many of the features that people like so much in languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.
Therein lay one problem: a very likable feature of those languages is the conspicuous un-Java-like, concise syntax. Groovy’s goal contradicts itself. It is nearly impossible to suitably translate non-Java features (e.g. closures) into Java-like syntax since neither the feature nor the syntax currently exist in Java. Groovy is syntactically trailblazing.
Mr. Spille’s solution is to alter the syntax, partly to preserve Java-ness but mostly to simplify the compiler. He is apparently more concerned about the workings of the parser than the language it parses. Yes, ambiguity is a difficult problem but that doesn’t mean the language should shoulder the complexity vice the parser. The more problem-solving the parser does, the cleaner the syntax. I don’t want to have to tell the parser I’m starting a closure if it can determine that on its own. Call me a minimalist extremist if you will, but if I could write a functional web-based shopping cart with one keystroke, I’d do it.


