On Tuesday, 8 February 2022 at 21:28:06 UTC, claptrap wrote:

Probably @noignore would be a better name. You're not really trying to dictate what people do with the result, just that they dont ignore it.

I'd like to see an option to annotate such an attribute. Something like this:

@mustuse("or else this could occur")

Then the compiler could return that message, rather than some generic message that provides no real insight into why that attribute was used in the first place.

Similar to C++20's: [[nodiscard("check if not null")]])

              • ... Ola Fosheim Grøstad via Digitalmars-d-announce
            • Re: ... Ola Fosheim Grøstad via Digitalmars-d-announce
            • Re: ... Walter Bright via Digitalmars-d-announce
              • ... forkit via Digitalmars-d-announce
              • ... forkit via Digitalmars-d-announce
              • ... Walter Bright via Digitalmars-d-announce
              • ... forkit via Digitalmars-d-announce
              • ... forkit via Digitalmars-d-announce
              • ... forkit via Digitalmars-d-announce
              • ... claptrap via Digitalmars-d-announce
              • ... forkit via Digitalmars-d-announce
        • Re: DIP 1038-... Daniel N via Digitalmars-d-announce
  • Re: DIP 1038--"@mustU... forkit via Digitalmars-d-announce

Reply via email to