Do we really need @unsafe?
Phil Deets
pjdeets2 at gmail.com
Wed Nov 11 09:59:29 PST 2009
On Wed, 11 Nov 2009 06:04:16 -0500, Don <nospam at nospam.com> wrote:
> Walter Bright wrote:
>> Don wrote:
>>> Actually, I'd hope for a way of checking that @unsafe functions are
>>> called only from @trusted functions, and NOT from unmarked ones --
>>> that's the way I'd proceed in moving a codebase over to 'safe'.
>> That would be fairly viral. I'm concerned it would make it an
>> impediment to use.
>
> Hopefully such functions would be really rare. It would be a strong
> encouragement to wrap them in an @trusted wrapper.
>
I have a feeling people would throw on a @trusted wrapper just to save the
work on propagating @unsafe attributes all through their code.
More information about the Digitalmars-d
mailing list