Contract programming syntax
Derek Parnell
derek at psych.ward
Wed Apr 8 14:01:07 PDT 2009
On Wed, 08 Apr 2009 10:46:19 -0400, bearophile wrote:
> But isn't a syntax like the following better? To me it looks more logic,
> because in{} and out(){} are part of the function, and there's no need
> of a special syntax for the body (and the 'body' keyword):
Yes!
I've never been happen with the awkwardness of the current syntax. It looks
just plain wrong and certainly not intuitive or helpful when reading code.
And as you suggest 'in' and 'out' are already special words (and Walter has
a special love for overloading keywords) so 'body' isn't needed in your
suggestion.
--
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
More information about the Digitalmars-d
mailing list