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."
How MUCH crack have you been smoking?
LISP is over-rated but XML is just fine?
Go Read
Try Python.
Amazing repost. Well thought out, with intelligence flowing from every letter.
If you were responding to my comment on Mumps, I would hope that you have at least seen the language. It was a decent language for the needs of its time (circa 1966 if memory serves), however the syntax of the language has led to decades of cryptic, obfuscated language. The only data type of the language is the string, which endows the language with considerable power for database applications. However, the language syntax, coupled with its interpreted heritage, encourages incredibly cryptic code. My employer has well over thirty years of Mumps code driving their database product, and the language's problems have lead to no end of headaches.
If, however, your comment was in response to my comment on the syntax of Water, in my view the language forces the programmer to write considerably more code to do the same job as other languages. In my view, this is not a step forward. A good, well designed language, should work to improve on the effort of previous languages without forgetting the lessons learned from them. This language does not, in my opinion, do so.
This was an interesting effort, particularly given the bifurcation of languages we have seen for internet development. However, they would have paid themselves signficant dividends by considering another path that did not tie their syntax to the SGML heritage. It was good for data presentation, but in my experience it does not expand well to solve other problems.
I stand by my comment on the readability of Water code and the maintenance issues of the language. I work with a number of programmers whose job security is derived from the poor quality code they have produced. It is bad enough that we have professional C++ programmers who are allowed (by their employers) to produce almost entirely unmaintainable code. The situation is compounded by creating a language that serves to make this easier.
As the co-designer of Water, I'd be happy to
respond to any questions. I've tried to
summarize the questions so far and give a
response to each one.
1. XML syntax is cumbersome, verbose, and should
not be used for a programming language.
MP: Agreed. That is why we had to invent
ConciseXML which makes XML as concise
as most languages based on Algol/C syntax.
It supports arguments by position, optional
ending tags, and non-string attributes.
2. Water does not use XML syntax
MP: Yes and no. It is true that most examples
are shown in the ConciseXML syntax, but
every ConciseXML expression could be written
in valid XML 1.0 -- it is just be more
verbose. In fact, ConciseXML supports the
mixing of XML 1.0 and concise forms in the
same document/program.
Every XHTML page on the Web is a valid Water
data structure.
3. Water co-mingles content and logic
MP: Most technologies either force you to separate
content and logic (which can get cumbersome),
or they co-mingle it (which is often easier,
but leads to a mess). Water is the first
language (that I know of) which supports both
-- the decision is up to the architect/programmer.
I believe Water is the first programming language
that makes it possible to work with both
markup and code without any barriers between
the two.
4. The comparison of Water to JSP was not
valid.
MP: You can never win when picking an example. I
found a book on JSP and used one of their
advanced examples. Because I wrote that
article, most people (unfortunately) assume
that Water is competing with JSP. My intention
was to show that a general-purpose language
(Water) can be simpler than a special-purpose
language (JSP). My new book has a bunch more
examples.
5. Who cares if "Hello World" example are simple,
how does it handle real complexity?
MP: Water code often looks simple, but the
designers of Water implemented languages
such as Common Lisp, Scheme, amd Dylan.
We have designed Water to have the power
of Lisp, but easier than Basic to start
using. For example, you can just type
in any HTML and it will run.
6. Lisp is very powerful (but didn't win)
MP: Agreed. One of the problems of Lisp was
that it was difficult for developers to
get to that power. Often first impressions
when looking at a piece of code are often
the basis for whether people like the language.
7. Why didn't Water use Scheme or Lisp as
the foundation?
MP: Neither Scheme nor Lisp had an XML syntax
that made it possible to mix content and code.
Also, I had a hard time learning Scheme and Lisp
at MIT, and we wanted to make Water much more
approachable. The underlying implementation of
Water has a lot of similarities to a Scheme or
Lisp interpreter.
8. Water is not free and therefore will lose.
MP: There is certainly a tension between making
a viable business and giving everything away
for free. Java was "free" from Sun, but other
vendors sold runtime licenses (J2EE) for
thousands of dollars per CPU for commerical
purposes. If a company can't make money by
selling a product, then the product and company
will likely die in the long term
because they can not afford to invest money into
product development.
Clear Methods intend to give a lot of Water
away for free, but charge money when people
get commerical value from it.
The pricing is meant to be very reasonable.