Slashdot Mirror


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."

60 comments

  1. Interesting.. but. by PFAK · · Score: 0, Troll

    Is there any feasible use for this? Or is it just another language. LISP is over-rated imho. XML is just fine, it looks like XML. It has a number of dependencies such as Java, etc. Which would make it harder to install for the average user.

    --

    Free means no restrictions, ironic the FSF's GPL forces restrictions, isn't it? What's your definition of free?
    1. Re:Interesting.. but. by Zach+Garner · · Score: 4, Informative

      How MUCH crack have you been smoking?

      LISP is over-rated but XML is just fine?

      Go Read

    2. Re:Interesting.. but. by Watcher · · Score: 1

      Only thing I have to say is, now I have to type twice the keystrokes to get half the work done? And, the language forces me to generate code that is difficult to read at a glance? Where do I sign up? Talk about job security in a language! Only thing better is Mumps!

    3. Re:Interesting.. but. by Zach+Garner · · Score: 2

      Like Mathematics, just because something is difficult and may not be directly applicable to the kind of programming jobs available, does not mean you should not learn it anyways. "Structure and Interpretation of Computer Programs" is one of the best Computer Science books. There is a reason the authors chose Lisp. Reading the book is enlightening.

      Personally, bit twiddling in C, requires me to use a great deal more keystrokes than in lisp. But, I generally avoid working at the level of abstraction that causes C to be useful.

    4. Re:Interesting.. but. by nosferatu-man · · Score: 2

      Not being smart enough to appreciate something is no reason to bad-mouth it, hoss.

      'jfb

      --
      To spur "enterprise Linux," Big Bang, the distributed two-phase commit.
    5. Re:Interesting.. but. by Watcher · · Score: 2, Informative

      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.

  2. First Post by Trusty+Penfold · · Score: 3, Funny
    First Post in Water
    thing.<set message="hello world">

    <server.http/>
    1. Re: First Post by Black+Parrot · · Score: 3, Funny


      > thing.<set message="hello world">

      Wouldn't a real OO language require sending a hello message to an object named world ?

      --
      Sheesh, evil *and* a jerk. -- Jade
    2. Re: First Post by KILNA · · Score: 1

      Don't foget that "hello" is a message object. :)

      --
      Error: PANTS NOT FOUND. Press <F1> to continue.
    3. Re: First Post by voodoo1man · · Score: 1

      It is truly sad when the only OO paradigm most people have ever known is message-passing. This leads to, among other stupid things, an irrational fear of multiple inheritance.

      --

      In the great CONS chain of life, you can either be the CAR or be in the CDR.

  3. VB by farnsworth · · Score: 1, Funny
    from http://www.waterlang.org/doc/articles/two.html :

    The goal of Water is to be easier to learn than Visual Basic

    I stopped reading right there.



    --

    There aint no pancake so thin it doesn't have two sides.

    1. Re:VB by wcbarksdale · · Score: 4, Insightful

      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.

    2. Re:VB by __past__ · · Score: 2

      I always felt that Brainfuck was pretty similar to Visual Basic: Both are simple to learn, but it's hard to do something iteresting with them.

    3. Re:VB by melonman · · Score: 2

      People who really understand a language could write it from scratch if they had to.

      Yes, but is this necessarily the fastest way to get the job out the door, or the best way to make code maintainable once the guy who invented the language has fallen under a bus?

      I've done a fair bit of programming in BASIC and Lisp, and there's no doubt in my mind that Lisp is the language of the Gods, but, for a lot of web applications, you don't need tail recursion or lexical scoping, you just need something that works, and which has a decent set of libraries to do all the hard work for you. Personally, I find that Perl usually does the job quite nicely: it has a lot of lisp-like features for when you need them, but if all you want is a list of instructions it does that too, and it is blindingly fast for everything except for intensive number crunching. If the OO layer wasn't so thin as to be transparent it would be pretty close to the perfect web language in my book.

      --
      Virtually serving coffee
  4. Sounds good. by mnmn · · Score: 3, Interesting


    I've done it all: PHP ASP Javascript, Java applets, mod_perl and the likes. I am still open to possibly a new lang that beats em all. Something thats

    (1) Open
    (2) Open source
    (3) Works for LOTS of databasen IMAP SSL LDAP etc
    (4) Flexible
    (5) Compilable on everything
    (6) plugs nicely into apache
    (7) Possibly compiles
    (8) Supports languages (i18)
    (9) Doesnt blindly try to follow C++
    (10) Is not so concept-based that its workings cannot be understood.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    1. Re:Sounds good. by Black+Parrot · · Score: 1


      > I am still open to possibly a new lang that beats em all. Something thats
      (1) Open
      (2) Open source
      (3) Works for LOTS of databasen IMAP SSL LDAP etc
      (4) Flexible
      (5) Compilable on everything
      (6) plugs nicely into apache
      (7) Possibly compiles
      (8) Supports languages (i18)
      (9) Doesnt blindly try to follow C++
      (10) Is not so concept-based that its workings cannot be understood.


      (11) Buzzword compliant
      (12) ...
      (13) Profit!

      --
      Sheesh, evil *and* a jerk. -- Jade
    2. Re:Sounds good. by Lao-Tzu · · Score: 2, Informative

      Try Python.

    3. Re:Sounds good. by massive-cow · · Score: 1

      You are incredibly vague.

      Java, Python, Perl and lots of other languages fit the bill quite nicely.

      By the way, SSL is a API and protocol for public key encryption, hence 'Secure Socket Layer' - not a database. Use of SSL is the job of the webserver, and has absolutely nothing to do with the language that the web application was written in.

      I suppose IMAP could possibly be called a database interface language, because a mail server vaguely resembles one - but that's a stretch.

      So what on earth are you talking about?

      Not to bash the language, as I really haven't taken a good look at it, but their example comparing Java servlets with Water was ridiculous. You cannot make a fair, honest or remotely reasonable comparison of languages on such a small scale, and use "this only took numer of lines as opposed to !"

      Disclaimer: I have gotten paid for JSP/servlet development.

      --
      Simplicity is prerequisite for reliability. - Dijkstra
    4. Re:Sounds good. by mnmn · · Score: 2


      I meant I used those in the languages. Anyone can do echo 2+2 in any language, implementing them in SSL+DB+IMAP webservers and between each other from different hosts is on a different complication level.

      I've used these languages in many scenarios and none can be called 'universal', although perl comes close.

      --
      "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    5. Re:Sounds good. by massive-cow · · Score: 1

      OK, from your profile, you appear to know what you are doing, but your comments make absolutely no bloody sense.

      How do you implement a language in SSL? IMAP? or a DB?

      You mean you've used the SSL libraries? Or you just configured your HTTP server to run an HTTPS service?

      --
      Simplicity is prerequisite for reliability. - Dijkstra
    6. Re:Sounds good. by Anonymous Coward · · Score: 0


      step back a minute and take a look at what he's saying. take your head out of your ass and stop being so pedantic.

  5. Interesting combinations of programming languages by Anonymous Coward · · Score: 5, Funny

    Water + PROLOG = Waterlog
    Water + Java = Kaffe

    Would a very large program written in Water be called Sea? Get it? Sea? C?

    Talk about diving into some Water programming. If you are under a lot of water programming, would you be drowning with work?

    Gator based on Ada and Water = Gatorada

    I'll shut up now.

  6. Re:Interesting combinations of programming languag by Anonymous Coward · · Score: 0

    You're all wet

  7. mod down... by tha_mink · · Score: 1, Funny

    Funny it doesn't look newish.

    --
    You'll have that sometimes...
  8. Here is Oleg's take on it by PissingInTheWind · · Score: 4, Interesting

    From: http://pobox.com/~oleg/ftp/papers/ILC02-impression s.txt

    * Sharpening the parentheses: bringing Lisp ideas to programming the Web

    Henry Lieberman of MIT Multimedia Lab.

    Henry Lieberman said that Lisp is indeed good for web
    programming, but people seem to prefer sharp parentheses () to round
    ones. If you can use Lisp, you should -- he said, -- but sometimes,
    you're constrained: you have to accept legacy XML documents and XSLT
    stylesheets. His solution: design a programming language with an XML
    syntax. He went on to describe a programming language,
    . As it turns out, XML syntax is indeed
    unsuitable for a programming language. So, the Language 'Water' uses
    some kind of a simplified XML syntax. The language is not Lisp either
    -- neither in notation (which is infix), nor in semantics. It looks a
    lot like a Javascript. Programs in the Water language can run either
    on a server, or on the client, in a browser plug-in.

    This talk left several people puzzled: at first the author
    said he wanted to use XML because it's popular, and Lisp because it's
    a good language. He ended up using neither. BTW, Water requires a
    license for a commercial use. I drew two conclusions: first, we need
    to advertise SXML better. SXML can do everything Water does -- and can
    do more and better. I also need to look up Henry Lieberman's slides,
    which say "Web community blew the web programming" and "web
    programming collapses under its own weight." Imagine a slide: Henry
    Lieberman, a colleague of Tim Berners-Lee, says: "Web programming is
    collapsing under its own weight." We need to save it.

    I wanted to talk with Henry Lieberman and point out that there
    is another way to assure interoperability with the XML culture. Rather
    than translating Lisp to XML, we can translate XML and XML tools into
    Lisp. That's what the SXML talk was all about. I didn't catch him. The
    conference schedule didn't leave much time for discussions. Anyway,
    SXML ideas are timely, we are not doing worse than other people -- and
    perhaps better.

    My overall impression from that talk is disappointment: I
    thought people at MIT media lab can design better languages than I do.

    --

    A message from the system administrator: 'I've upped my priority. Now up yours.'
  9. Highly Biased Examples? by Unknown+Relic · · Score: 4, Insightful

    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.

    1. Re:Highly Biased Examples? by aminorex · · Score: 5, Insightful

      I have to agree with you.

      My impression is that the Water vs. JSP example
      is a poor one because JSP is designed for a
      different scale of complexity and level of control.
      The overhead for JSP programming is quite large,
      but as a result of buying into it's infrastructure,
      you get a lot of library support. That makes it
      suitable for large-scale development, where functional
      components need to be finely factored and real-world
      issues like deployment methods and human resource
      application come into play. It's also a poor
      example for showing the benefits of Water (of which
      I admit ignorance) because it makes Water look
      like a toy.

      Think about a Hello, World program.

      Basic:
      Print "Hello, World!"

      C:
      #include
      int main (int * ac, char ** av) {
      printf("Hello, World!\n");
      }

      Java:
      import java.lang.*;
      package org.slashdot.examples;
      public class HelloWorld {
      public static void main(String args[]) {
      System.out.println("Hello, World!");
      System.exit(0);
      }
      }

      Each of these is increasingly verbose and complex,
      yet who would argue that it was more complicated
      and difficult to develop and maintain a typical
      3-tier application in Java than in Basic?

      Of course the cost of entry is not a definitive
      indicator of the leverage offered by a platform!
      (format t "Hello, World!%n")
      is pretty straightforward, but CommonLISP is a
      very sophisticated and highly leveragable
      environment. It may well be that Water has
      inherited a similar scalability, but the example
      fails to show this, by virtue of its triviality.

      --
      -I like my women like I like my tea: green-
    2. Re:Highly Biased Examples? by a2800276 · · Score: 2

      I'm having difficulty deciding if you're just stupid or trolling, so I'll give you the benefit of the doubt.

      Where did you come up with those "Hello World"-Samples?

      import java.lang.*;
      // no need to import java.lang.*. If you do you would have to do it you should ...
      package org.slashdot.examples;
      // ...place it _after_ the package declaration, which is also not necessary
      public class HelloWorld {
      public static void main(String args[]) {
      System.out.println("Hello, World!");
      System.exit(0);
      // as is the call to System.exit.
      }
      }

      While at the same time, your C code is incorrectly abbreviated.

      #include
      // you're not including anything with the above, while you would actually need to include:
      #include <stdlib.h>
      #include <stdio.h>
      int main (int * ac, char ** av) {
      printf("Hello, World!\n");

      // calling the exit function on success is much more common in C than in Java, and considered good style:
      exit(EXIT_SUCCESS);
      }

      Leaving out the comments I come to 124 chars for the c programm and 112 for java. The java example is certainly less complex when you leave out all the confisuing crap you threw in. Try to explain: (int * ac, char ** av) in 100 words or less!

    3. Re:Highly Biased Examples? by ameoba · · Score: 2

      Of course the examples are biased; look at the website. It looks more like a press-release or an advertisement than a community site. It's more in the vein of this, this, and this than it resembles this, this, or this. Water is clearly being developed & marketed from "dazzle the PHB with buzzwords" angle. The big difference is that Clear Methods doesn't really have the size, reputation, or money to stuff something like this down everyone's throats. It's an even harder sell when you have tojustify the cost in comparison to the competition, which is free.

      --
      my sig's at the bottom of the page.
    4. Re:Highly Biased Examples? by thelexx · · Score: 2

      The day I found Velocity was the day I forgot JSP existed. Unless this new tool can somehow manage to provide even more power and flexibility than servlets + Velocity templating (with a smidgen of Javascript for controlling form data entry), it's DOA to me.

      --
      "Gold still represents the ultimate form of payment in the world." - Alan Greenspan, 1999
    5. Re:Highly Biased Examples? by lsdino · · Score: 1

      Try to explain: (int * ac, char ** av) in 100 words or less!

      av is an array of strings which holds your arguments. ac is the count of arguments passed to the
      program. av[0] is the program name that was ran. av[1] is the first argument.

      Do I win a prize?

      Anyway, ac shouldn't be a pointer to an int - it should be an int, eg: int main(int ac, char **argv)

    6. Re:Highly Biased Examples? by a2800276 · · Score: 2

      Try to explain: (int * ac, char ** av) in 100 words or less!

      av is an array of strings which holds your arguments. ac is the count of arguments passed to the
      program. av[0] is the program name that was ran. av[1] is the first argument.

      Do I win a prize?


      Well your answer is correct, so you get a smiley. Then again, I didn't ask what those meant in the context of the main function... That's not the point, though.

      A thing to explain to somebody who doesn't know C anyway would be, e.g. what's **?


      "I though * meant pointer and now your telling me it's an array, and I though arrays are symbolised by []"

      "Why do I need to pass the function the length of the array? When I initialise an array, I have to specifically state how many elements it's supposed to hold, so why can't the compiler just remember?"


      Those things are clear to somebody who knows them, but they're not intuitive. Finally, the post was a rebuke of the parent that claimed (String [] args) is more complicated and verbose than (int * ac, char ** av)
    7. Re:Highly Biased Examples? by cant_get_a_good_nick · · Score: 2

      Try to explain: (int * ac, char ** av) in 100 words or less!

      For a beginners example, you don't need to.
      int main(void) works just as well. Also removes some of the charcount.

      the exit(EXIT_SUCCESS), though correct in form, is a bit verbose for something that you use as a code example, and can just be exit(0) especially since you use the equivalent System.exit(0) in Java.

      If you wanted it real slim, though wrong, you could withhold the #include's. You'd get warnings on compile, but it would link fine. You could also scotch the exit(), though without it you'd get undefined behavior. Some systems would be OK and just give unknown exit values to the shell, some might have problems. Most DOS code defines main as void main(...)

    8. Re:Highly Biased Examples? by J.+Random+Software · · Score: 2

      I don't think ISO C guarantees that zero will be regarded as a successful termination (much less that EXIT_SUCCESS equals zero), though POSIX probably does.

      I'd argue that calling System.exit is a Really Bad Idea unless you are absolutely certain you are the only app. One of the design goals of Java was to confine untrusted code without relying on process boundaries, which means an ideal system would run just one JVM for all users with an elaborate security policy.

  10. Still think zope has more potential by Max+Romantschuk · · Score: 3, Insightful

    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 :: http://max.romantschuk.fi/
  11. XML syntax? by Kopretinka · · Score: 4, Insightful
    I wonder - have the authors of Water ever seen XML? What they have does in fact use pointy brackets, but that's about it. Consider for yourselves:

    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?
    1. Re:XML syntax? by melonman · · Score: 2

      What I can't work out is why anyone would want to program (as opposed to handling data) in a language that looks anything like XML. XML is designed first and foremost to be written and read by computers. Sure, it is also supposed to be possible to eyeball it, but the sheer verbosity of XML makes trying to work out what is going on in any non-trivial case a major test for (human) memory. I've always thought that one of the hallmarks of a good language is that it lets you do the common things in the shortest possible amount of lines, and lets you see the overall structure without wading through all the detail.

      --
      Virtually serving coffee
    2. Re:XML syntax? by Kopretinka · · Score: 2

      Because XML is the fashionable acronym now.

      --
      Yesterday was the time to do it right. Are we having a REVOLUTION yet?
  12. Re:Interesting combinations of programming languag by Black+Parrot · · Score: 1


    > Water + PROLOG = Waterlog
    > Water + Java = Kaffe

    Water + BASIC = pottie training language.

    Water + Visual BASIC -- let's not go there, OK?

    --
    Sheesh, evil *and* a jerk. -- Jade
  13. Well by sinserve · · Score: 2

    [WARNING] I haven't touched the Water specs, so I will just assume it is a REAL lisp
    but with a different syntax, an not just another "language" with a half-assed S-exps
    based syntax, like XML
    [/WARNING]

    Someone was talking about "Sharpening the Parenthesis" at his past International Lisp
    Conference. If this isn't the same guy, I guess they beat him to it.

    But then, couldn't these Water guys just embed a free Common Lisp (specially ECL)* or any
    of the gazillion scheme kernels (specially scheme48) into their web platforms and still
    have the same effect (plus the ability to work with a real language, specially in the case
    of Common Lisp were one has macro, an excellent objec t system (CLOS + Meta Object Protocol)
    and rich builtin datastructures?

    --
    * ECL is under a BSD like system and the VERY powerful CMUCL is public domain!!!

  14. Re:Here is Oleg's take on it + Troll by foniksonik · · Score: 4, Interesting

    "you have to accept legacy XML documents and XSLT
    stylesheets"

    When did XML become a 'legacy' language?

    Wow, the 2nd millenium sure is moving fast!

    --
    A fool throws a stone into a well and a thousand sages can not remove it.
  15. Not again!! by pong · · Score: 3, Insightful

    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.

    1. Re:Not again!! by Anonymous Coward · · Score: 0

      XML 1.0 is for machines.
      ConciseXML is for humans and machines
      because it is easily parsable AND very
      concise. A language that is easily
      parsable makes it much easier to create
      tools for the language. For example,
      you can step expression-by-expression
      in Water, not just line-by-line.
      You can also double-click at the start
      of any expression and it will select
      the entire expression. Most IDE's can't
      even do something that simple.

  16. When we met these guys... by Anonymous Coward · · Score: 0
    Some time last year (or more? I forget) these guys came to our company looking for early adopters. I remember asking the question over and over, "If we're already doing JSP and XML, what's the incentive to switch languages for production?" And there wasn't a good answer.

    We did agree, however, that Water would likely make a kickass rapid prototyper for web-sensitive tools and utilities. But aren't there a bunch of other languages that fit this model now, too? Is Ruby the one I'm thinking of that has all kinds of web stuff integrated into it? The major difference with water would be the XML-like syntax (as another poster pointed out, angle brackets alone doth not an XML language make).

    I was worried that it was too buzzword compliant. They took the term "web services" and ran with it in a direction that allows them to say the whole language is about generating web services. You could arguably say that about any language that has built in HTTP I/O, if you wanted to.

    I suppose if you don't already have a heavy investment in one of the existing web platforms (Java, C#, Perl, Python...) then there could be some potential. We just couldn't find more than a token reason to switch (imagine if we had one toolsmith who did everything in Water, and then he went on vacation? i wrote a file parser once in Icon that had the same problem, I couldn't hand it off to anybody else on the team).

  17. XML/SGML legacy by merriam · · Score: 1

    That's the way it seems to me too. XML is a revision of SGML. Together they are widely used, and ancient in web terms, in that SGML predates the web.

    SGML can also be seen as a big step back from Lisp's s-expressions. I imagine that if sexps had used angle brackets from the start -- instead of parentheses, which clash with the ordinary use of parentheses in plain text, and are also harder to type -- Lisp-like languages would be more widely used for structured text processing.

    Perhaps they would have led to an earlier web. Lisp was developed in the late 1950s.

  18. Re:Here is Oleg's take on it + Troll by PissingInTheWind · · Score: 2

    Just to make everthing clear, 'Legacy' was the term used by Lieberman in his talk. I think he means that if you want to use something new (or different), everything you used before and that you still have to support can be considered as 'legacy'.

    Wow, the 2nd millenium sure is moving fast!

    No, it's just that its regression is beginning to slow down.

    --

    A message from the system administrator: 'I've upped my priority. Now up yours.'
  19. This language is UGLY by Viol8 · · Score: 2, Interesting

    XML is designed to represent data. Trying to shoehorn a procedural and OO programming language into its format is a recipe for disaster and thats exactly what these guys have come up with. Its long winded, ugly and hard to read. I really can't see any programmer wanting to work with this. There was a reason netscape invented Javascript , not some form of procedural HTML. Still , at least this language will be a lesson in how not to design one. Expect this language disappear fast except for a mention in comp sci compiler/interpreter text books and the occasion far flung outpost of masochist coders.

    1. Re:This language is UGLY by Anonymous Coward · · Score: 0

      I'd be interested if you actually looked
      at any Water code. In general, it has
      less verbosity than either Java or JavaScript.
      For example, the new book on Water has
      408 pages and over 1000 fully working
      standalone examples. That is hard to
      do unless things are compact. Did you
      take a look at ConciseXML?

  20. Water not valid XML at all, nor is it a language by Anonymous Coward · · Score: 0

    The attributes need double quotes around them, for one. The tags are not regular. A Water program is neither valid XML nor is it well-formed.
    Water is neither XML, Javascript or Lisp.
    It takes the worst aspects of all these language - plus adds some bizarre and hard to read syntax of its own. This language is a disaster and is completely unreadable by a human being. It solves no real-world problems as far as I can tell.
    This Water language will never be used by anyone.

  21. Are you for real? by Anonymous Coward · · Score: 0

    There is nothing "to understand" with Water - it's a procedural language crammed into God-awful XML-like (but not really XML) syntax.
    What is the point of creating a computer language that takes 10 times longer to type and is impossible to read?
    It solves no real world problem.

  22. Warning! by Cap'n+Canuck · · Score: 3, Funny

    It'll never float.

    You were warned.

  23. Why this syntax? by Anonymous Coward · · Score: 0

    After scanning through the Water book, I learned that this:

    1.

    returns 3. Where in the world did the 1. prefix come from? It would be nice if it was . That would make sense. The incestuous infix notation of would make a little less sense. Even if you did it RPN-like, , it would make some sense. But, 1.? Why? Is there some previous programming language that looks like this?

    IF-statements are even stranger:

    count.
    "Count is greater than 50"

    Strange! This would make more sense:

    "Count is greater" />

    After reading the book and working through some examples, I like everything about the language except this bizarre part of the syntax.z

    1. Re:Why this syntax? by Anonymous Coward · · Score: 0

      After scanning through the Water book, I learned that this:

      1.(plus 2/)

      returns 3. Where in the world did the 1. prefix come from? It would be nice if it was (plus 1 2/). That would make sense. The incestuous infix notation of (1 plus 2/) would make a little less sense. Even if you did it RPN-like, (1 2 plus/), it would make some sense. But, 1.(plus 2/)? Why? Is there some previous programming language that looks like this?

      IF-statements are even stranger:

      (if) count.(more 50/)
      "Count is greater than 50"
      (/if)

      Strange! This would make more sense:

      (if (more count 50) "Count is greater" /)

      After reading the book and working through some examples, I like everything about the language except this bizarre part of the syntax.z

      ############# Previous post above

      I changed your 's to ('s so the browser would eat them.

      I'd also like to hear an answer to your question. I understand the reason for infix notation. It's all that the poorly educated teachers that we have understand. Prefix is nice, and postfix is very nice for a calculator. A notation like a+b = a.(plus b) doesn't make any sense. Anyone have any idea why they did that?

    2. Re:Why this syntax? by Anonymous Coward · · Score: 0

      A few reasons:

      1. In English, the subject object comes
      first, followed by a verb. Water follows
      the same convention, so expressions can
      "read" from left to right.

      1.<plus 2/>
      car.<driven by="Mike"/>

      2. Most of the leading languages use
      dot syntax and developers generally
      like the dot notation of Java, JavaScript,
      Basic. Water follows that convention.

      3. A "subject" is not required. You
      could always create a function called
      "add" that is called like:
      <add 3 2/>

      4. You probably want a "subject", though
      because that is the object in which the
      method is found within.
      In the following expression:
      1.<plus 2/>
      The "plus" method is looked up in integer
      object 1.

  24. Comments from the co-author of Water by Mike.Plusch · · Score: 2, Informative

    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.

    1. Re:Comments from the co-author of Water by Xandis · · Score: 1

      I think making money is a very good thing and I have no preference for open or closed source products but when I see these consulting fees:

      Consulting Services
      Architect: $3,000 per day
      Programmer: $1,500 per day
      Jumpstart Workshop: $20,000 for one-week, up to 6 developers

      and the other ways money is to be made ($100,000 for joining a committee!!!), I get the feeling that you guys are out to line your pockets by faking out stupid corporations who will waste gazillions on anything they don't understand. I get that curl feeling...

      Good luck though since you will be competing with Sun and Microsoft.

      I leave this bit to ponder from http://www.paulgraham.com/langdes.html:

      "If you look at the history of programming languages, a lot of the best ones were languages designed for their own authors to use, and a lot of the worst ones were designed for other people to use.

      When languages are designed for other people, it's always a specific group of other people: people not as smart as the language designer. So you get a language that talks down to you. Cobol is the most extreme case, but a lot of languages are pervaded by this spirit.

      It has nothing to do with how abstract the language is. C is pretty low-level, but it was designed for its authors to use, and that's why hackers like it.

      The argument for designing languages for bad programmers is that there are more bad programmers than good programmers. That may be so. But those few good programmers write a disproportionately large percentage of the software.

      I'm interested in the question, how do you design a language that the very best hackers will like? I happen to think this is identical to the question, how do you design a good programming language?, but even if it isn't, it is at least an interesting question. "

      -----

  25. the usual off-by-one error by Anonymous Coward · · Score: 0

    > Wow, the 2nd millenium sure is moving fast!

    Errr, actually, this is the 3rd millennium.

  26. Comments from a potential Water programmer by Anonymous Coward · · Score: 0

    Dude, the language is ugly and is unreadable by humans.
    Who's gonna use it? C3PO?

  27. Bad memories by TheConfusedOne · · Score: 1

    People who really understand a language could write it from scratch if they had to.

    I have some very bad memories of trying to write a "meta-circular evaluator" in scheme.

    As I used to say: Any language that's a dialect of a speech impediment should simply be avoided.

    --
    --- I wish I could hear the soundtrack to my life. That way I'd know when to duck.