It probably will not strike you as a surprise that there is a lot to do these days on the next programming language. Java - wildly popular as it may be - does have some limitations and there are some things that you just cannot shoehorn into into the language without violating its conceptual integrity.
From all of these pretenders to the Java throne, we at Xebia probably like Scala most, for various reasons. We like the fact that it marries two programming paradigms (functional and OO), that it can be extended, and that there is type safety without paying a huge toll. But there are obviously alternatives such as Erlang, Clojure and LUA (and Fortress, perhaps, some day?).
But hold on, there is more… There is something out there, and you may not be aware of it. Before I reveal its name, I will refer to it as programming language Rarebit.
- Rarebit has immutable state only. In that sense, it's more like Erlang than like Scala. In terms of Scala, everyting in Rarebit is a val. (As a consequence, programming recursive structures is not uncommon in Rarebit.)
- Rarebit has pattern matching, just like Erlang and Scala. In fact, it takes pattern matching to a whole new level, since your entire program is basically driven by pattern matching. (Pattern matching driven is the new 'driven'?)
- Like Scala, XML is a first class citizen in Rarebit. There is a difference though. In Scala, if you want to address a particular node in your document, you use an XPath-alike expression. In Rarebit, it is really one-hundred-percent XPath.
- Like Scala and Clojure, Rarebit lives on the Java VM. Normally, it is interpreted, but it is also possible to compile Rarebit downto plain old bytecode.
- Unlike Scala and Clojure, Rarebit does not allow you to call native Java libraries just like that. You can however get that by using extensions that I will discuss later on. However, out of the box, it doesn't support it. That's a bless and a curse, but I am hanging towards the bless. Because of this 'limitation' Rarebit really is guaranteed to be side-effect free. And that's not all, because:
- Unlike Scala and Clojure, Rarebit does not require the VM. There are other versions that run directly on the host operating system. In that sense, Rarebit is more similar to Ruby and Python: they all come in a C-version and in a J-version.
- Unlike LUA and Ruby, the entire language is specified, submitted to a standardization organization, and officially endorsed.
- Unfortunately unlike Scala and Ruby, Rarebit is extremely stable.
- Rarebit is dynamically typed, just like Clojure and Erlang, although a later version (largely backwards compatible) allows you to work in a more strongly typed manner, more like Scala.
- Rarebit does allow you to pass around function pointers, and it does support something that - with a bit of imagination - you could consider support for closures. (Just like Scala.)
- Rarebit is extensible. That is, it allows you to add more language constructs to the language, although it's questionable if you can really talk about it in that way, since:
- In Rarebit, your code is just data, just like in Clojure. So you can manipulate programs using programs easily.
- Rarebit does however allow you to introduce new 'syntax' that will also allow you to call out to libraries outside of the set of functions supported by Rarebit itself. Note however that - if you use these features - you can introduce side-effects, which is clearly not necessarily a desirable feature.
- Unlike Scala and Clojure, Rarebit has very decent IDE support. (I guess it won't be long until Scala support in IntelliJ becomes up to par.)
Sounds pretty good huh? I bet you want to get your hands on that programming language. So here goes nothing:
Rarebit = XSLT

9 comments:
I just *knew* you were talking about XSLT!
Such an under-appreciated language!
:-)
I expect you to write highly concurrent applications, high-availability servers and distributed storage systems using RareBit and then blog about it. ;-)
Hey! I never claimed it was able to do that! ;-)
>I expect you to write highly concurrent applications, high-availability servers and distributed storage systems using RareBit and then blog about it.
Why blog about something that's already been described by others?
http://www.balisage.net/Proceedings/vol4/html/Robinson01/BalisageVol4-Robinson01.html
That system is handling 1m requests/day and "It may be interesting to note that almost all of the Filters we've implemented are XSLT stylesheets. Only a few of the Filters have been implemented directly in Java. "
Amusing.
BTW, that's Lua, not LUA. Not an acronym.
Well done but XSLT is a pain:
http://martinfowler.com/bliki/MovingAwayFromXslt.html
It's for MACHINE not humans, as far as I know most programmers are human or aren't they maybe there are some exceptions ;)
Litterate programming, intentional programming becomes more and more important, that's what "abstraction" really means.
The Martin Fowler quote was from 2003 so it predates XSLT 2.0. Interestingly the way he's processing XML in Ruby is very similar to the way I started doing it in 1998 in Java. I gradually found the need to make the processing increasingly declarative to keep it maintainable for complex transformations and usable by people other than myself, and my system soon evolved into the XSLT processor known as Saxon.
@philho: Thanks, you're right, I will update that.
@RebolTutorial.com: ???
Do you mean to say that - since Martin Fowler has an opinion about it - I should surrender my own opinions?
Hey there,
We have been reading the articles on your website http://blog.flotsam.nl/
and are very impressed with the quality of your information.
We have a team of copywriters who specialize in writing articles on various topics and would like to write an original article for you to use on your website – this article will not be used anywhere else on the Internet.
In exchange all we ask is that we can have one or two links within the body of the article back to one of our sites.
If you are interested in having us write an article for your website please just let me know and we would be more than happy to have one written for you within two weeks.
Kind regards,
Papia
Post a Comment