OCL or Java-like?

By Dimitris Kolovos

The concrete syntax of EOL (and thus all the languages that build atop it) has been influenced by OCL and Java. From Java it inherits things like if branches, while loops and return statements. On the other hand many things are influenced by OCL: the comparison operator is = (== in Java), the assignment operator is := (= in Java), type conformance is checked using x.isKindOf(Type) (x instanceof Type in Java) etc.

The initial rationale about this was that we wanted the languages to be more accessible to OCL-users than to Java-users. Nevertheless, we have found that Java-developers make the biggest part of our audience and to them this syntax seems a bit exotic. We are seriously thinking about providing an alternative, more Java-friendly concrete syntax in the future…

One Response to “OCL or Java-like?”

  1. alex Says:

    I for one would prefer single syntax. Mix of OCL for declarative parts and Java(script) for imperative ones is fine with me, especially since Epsilon does away with “->” OCL operator.

Leave a Reply