What is nothrow for?

Janice Caron caron800 at googlemail.com
Fri Apr 25 11:16:14 PDT 2008


On 25/04/2008, Yigal Chripun <yigal100 at gmail.com> wrote:
> if the compiler provides hooks for the attribute writers than an
>  attribute would have meaning for the compiler.

I don't agree. I think Walter's right. An attribute is a contract, and
only the compiler is in a position to enforce that code complies with
contracts.

For example, suppose I wanted an attribute that meant "this function
does not modify static members" - what kind of "hooks" would make it
possible to enforce that contract, if it were not built into the
compiler?



More information about the Digitalmars-d mailing list