Satire City, CA
Jan 30, 2008
At a recent Java conference, tempers flared and developers ultimately took to the streets in protest over a controversial feature proposed for Java 7.
Prior to the conference, the proposition of multi-line string literals seemed benign: the concept is not new, and is found in many languages. An example:
String thePoint = """Unfortunately, the issue exposed deep philosophical divisions within the Java community, and civic unrest ensued.
The School of Grafters
At the main presentation, one academic group pitched their proposal for multi-line string literals. Their thesis:
- "In another thirty years people will laugh at anyone who tries to invent a language without multi-line strings."
- This new feature will free programs of much of their accidental concatenationicity.
- Multi-line strings can be seamlessly woven/grafted into the language, without an extension to the existing Java type system.
- The implementation of multi-line strings could be a straight-forward application of Generics.
The Block Camp
From the outset, it was clear that this group was more conservative, and desired to block the proposition. The presenter made the following points:
- The usage of multi-line strings will encourage an exotic style of string concatenation, possibly fostering dialects and hindering string portability.
- A new feature should have a minimal addition to the lexical surface area: surely the + symbol has a higher power-to-weight ratio than """.
- James Gosling wrote, circa 1997, that Java is a "blue collar language" which modestly gets the job done. It's practical, not theoretical!
The Junkies and Dead-ends
Finally, the last speaker on the panel walked to the podium. In a quiet voice, he confessed that he was a feature junkie and that he represented a group of developers who were irrationally drawn to new features such as multi-line strings. He described the inner turmoil of being a junkie: living with both feature lust and also the burden of backward compatibility. His only solace was to consider Java a dead-end with respect to new features.
It was a tender moment, until his conclusion:
What's the big deal anyway? Why not use multi-line strings in Scala, compile the code down to bytecode, and just use that?At this point, the crowd erupted for the final time, streaming past the guards, and spilling into the streets. Soon, they carried placards and bull-horns, appealing for unity.
The mob protested for several hours until, finally, local police brought in staff from JetBrains to hand out free IntelliJ licenses.