Water, a Newish Web Language Out of MIT
jimdesu writes "True to its religion, MIT has reinvented LISP again, this time as a web-programming language called Water.At first blush, it looks rather interesting. It supports hashes, vectors and objects (prototype based) in a manner that makes it look as much like XML as one could possibly conceive. I'm certainly going to play with it. Anyway, the url is at http://www.waterlang.org."
Why? Understanding Scheme is much simpler than understanding Visual Basic. People who really understand a language could write it from scratch if they had to.
Is it just me, or is the Water vs JSP example highly biased? I mean I'm as interested as anybody else about a new programming language, but the use of such an example really made me question if finding out more was worth my time.
For those of you who didn't read the document, "The task is to create a new HTML tag with a single parameter, message, and use the tag from an HTML page to insert the chunk of HTML"
Essentially what they want to do is define a new html tag and have it spit out a message. Not surprisingly, this is exactly how water seems to worry. According to their findings, this task can be completed in a single 7 line file in water, while using JSP it requires 4 files, 65 lines of code and 4 languages! While I'm not experienced with JSP, from looking at the code not only do they seem to be using a hugely complex solution for a simple problem, but a lot of unnecessary code as well. This doesn't even take into account the fact that they are counting blank lines as lines of code, and are putting every single opening and closing curly bracket on iits own line!
I can't speak for the rest of you, but I would be much more interested in seeing some comparative examples which try to solve a problem in the manner best suited to each language. This nonsense of implementing a single highly specific and language biased solution to a very simple task just doesn't cut it.
Water looks remarkably like ColdFusion... XML or not... I've used ColdFusion for quite some time, and separating logic and content is really difficult.
Zope Page Templates is the fisrt solution I've seen so far which really separates content and code, while enabling editing of dynamic templates in a regular html editor...
.: Max Romantschuk
true.<and false/> />
<thing foo=5/>.<equal <thing foo=5/>
object.<get key lookup=false if_missing='return' default=false/>
I've seen a language that works with XML as a first-class data structure, but it had a normal C-like syntax, say
x = <foo bar="3"/>;
if (x.bar == 3) {...};
IMHO the latter makes much more sense - you can work with XML and you don't have to learn a whole new LISPy hybrid syntax.
Yesterday was the time to do it right. Are we having a REVOLUTION yet?
When will people figure out that xml is perfect for machines but only tolerable for humans. Programming is for humans, not for machines. So what if it is a bit harder to write a parser/compiler for the programming language, if only it is easier on the programmer? XSLT sucks, because it is itself defined in XML. Now these guys are making the same mistake.
Actually programming in XML takes away the clarity of expression that you would ideally have in a programming language - it is not terse, and the syntax is way too noisy. Take a look at ruby, if you are at all interested in a terse language, where it is easy to write code that actually communicate intent.