ref is unsafe
Rob T
rob at ucora.com
Wed Jan 2 22:11:31 PST 2013
On Thursday, 3 January 2013 at 00:13:41 UTC, H. S. Teoh wrote:
> On Thu, Jan 03, 2013 at 12:53:56AM +0100, David Nadlinger wrote:
>> On Wednesday, 2 January 2013 at 23:08:14 UTC, H. S. Teoh wrote:
>> >All extern(C) functions must be @system by default. It makes
>> >no sense
>> >to allow a @safe extern(C) function, since there is no way
>> >for the
>> >compiler to verify anything at all. The best you can do is
>> >@trusted.
>>
>> @trusted shouldn't be a part of the function signature anyway,
>> see
>> http://forum.dlang.org/thread/blrglebkzhrilxkbprgh@forum.dlang.org.
>> Somebody up for creating a DIP on that?
> [...]
>
> Good point, @trusted is an implementation detail that should
> not pollute
> public APIs.
>
>
> T
Reading through the discussion on the subject, I have to agree
that @trusted should be used to mark implementation details and
not the api.
--rt
More information about the Digitalmars-d
mailing list