This is a demonstration site that shows that the idea behind Else Logic work in reality. The aim is to incorporate these ideas in future versions of SQL, XQuery and other programming languages e.g. through language integrated query.
Also the new syntax specified here is experimental. If you think I got it wrong or you know better I would like to hear from you.
I started this project out of dissatisfaction with the current state of the art in XML manipulation languages. One particular peeve of mine was the lack of outer join support in XQuery. This led me to research the general nature of this problem.
While not being a Computer Scientist by education it was a short talk with Phil Wadler during POPL 2007 that made me aware that the implementation of outer joins in other languages than SQL was a general unsolved problem. Fairly quick I could think up a different way of performing outer joins - that I have named outer product - but immediately it was obvious that this solution has a problem as it required the writing of a lot of subqueries.
What was also obvious was that the outer product solution was so simple that someone must have thought of it before. Later I did find out that indeed Don Chamberlin, one of the fathers of SQL, had indeed proposed this method as a solution to implement outer joins and that Chris Date had opposed this solution because the problem with subqueries.
However, looking at the subqueries, my first thought was that I was seeing a lot of repetition in the code. There had to be a method for removing that repetition.
Seeing repetition is one thing, but removing repetition and having a language that can be understood by programmers took more time. I think Else Logic does the trick, but please let me know what you think.
Like other code reuse method Else Logic does reuse code already written by the programmer. Unlike other code reuse methods Else Logic does not require the programmer to assign names to the code being reused; instead the core of Else Logic uses existing language keywords to mark the code to reuse. Where extra keywords are used for marking the code to reuse this is done by choice; not because this is required by Else Logic. Only for reusing the code do we need new keywords, though this can also be implemented by leaving out keywords required by current syntax.
The result is code that is concise yet readable and that can implement outer joins in short code - with the directional aspect that is part of their definition.
I think Else Logic is a methodology that can be applied to any programming language or at least to many languages... except for the pesky problem of null values.