On Friday, 27 July 2012 at 11:50:46 UTC, bearophile wrote:
Namespace:

Good point. I had completely forgotten, that that is possible.
But it seems that no one would have interest in my second proposal. :)

Similar things were discussed a lot. And some people think that similar nonnull annotations are a good idea.

Bye,
bearophile

Then: What is the problem to introduce such shorthand?
To solve the problem with a struct is IMO a really _bad_ idea.
Because then you have to pack the object into the struct (or you have to create the object with a function that returns this struct, equally as "scoped" does it currently) and _then_ you can pass it to the function/method.
Still the same effort as if you solve it with preconditions.
Completely unnecessary work, and such shorthand can avoid this.

Reply via email to