2011-05-31

type constraint decl's

5.18: adda/type/constraint syntax:
. the lang' needs a compact integrated way to
indicate subrange;
eg, i.Z(1...10) -- new Z constrained to 1..10 .
. the parser rule could be that
if the typemark is for a parameterized type
then it expects a parameter;
if it finds an unexpected parameter
(ie, a parenthetical expression)
then it can assume it's a subtype constraint .
. as with functions, (@) can be used for
indicating a symbol returning parenthetical;
eg, i.Z@myConstraint;
eg, i.paramizedType@arg@constraint .

No comments:

Post a Comment