...or isn't OMG's OCL a simple but adequate functional language?|
OCL was always intriguing me as a would-be bridge between class-OO-oriented OMG's MDA and a pure functional world. Every time I see a new revision of OCL, I hope - now, they finally gave up their cruft, here comes the new light. Alas... It suffices to look at Figure 3-7 (Abstract syntax metamodel for let expression) to abandon your hope.
It's neither simple nor precise...
But my reason of writing all this - is anybody familiar with the background of OCL becoming in fact Query language, not Constraint one, as the name might suggest? Why it's supporters have chosen pure functional semantics? Why it remained so limited, without any nice and powerful features one would expect in a pure FL?
I know OCL 2.0 is a horse by committee, does its design represent a subconscious function envy in the industry? :-)
Thanks for your time :-)