Jeremy Hylton wrote:
BAW> Think about my proposal this way: it actually removes a BAW> restriction.
I think this is really the crux of the matter! The proposal removes a useful restriction.
The alternatives /F suggested seem clearer to me that sticking new attributes on functions and methods. Three things I like about the approach: It affords an opportunity to be very clear about how the attributes are intended to be used. I suspect it would be easier to describe with a static type system.
Having to be explicit about the method <-> regex / rule would severely damage SPARK's elegance. It would make Tim's doctest useless.
It prevents confusion and errors that might result from unprincipled use of function attributes.
While I'm sure I will be properly shocked and horrified when you come up with an example, in my naivety, I can't imagine what it will look like ;-). - Gordon