Ceylon is a language for defining structured data as well as regular procedural code. One of the first things you run into when defining data formats is the need for micro-languages - syntactic validation for character strings that represent literal values of some data type. For example:
We've already discussed the theory behind operators in Ceylon, but I missed out on giving you guys an actual list of them. In compiling this list of operators, we've tried to select operators that make code easier to read instead of harder to read. (Ceylon is supposed to be a language that eschews ASCII-art.) There are a couple of operators in the list that I have doubts about, especially the format operator, $, that is used to format an object to a string.
I'm speaking about Ceylon on Thursday, June 23, at 10am at JAX in San Jose. My last conference presentation on the subject of Ceylon was well-received at the conference itself, but not when subsequently published online, leaving we with the impression that it wasn't very effective. So I'm taking a different tack this time.
In Introduction to Ceylon Part 8 we discussed Ceylon's support for defining higher order functions, in particular the two different ways to represent the type of a parameter which accepts a reference to a function. The following declarations are essentially equivalent:
We've talked quite a lot about union types, and even seensome of theirmanyapplications, but one thing I didn't mention is that they can be used as a kind of checked exception facility. Consider the following method declaration: