[Issue 11176] array.ptr in @safe code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 5 17:24:58 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11176
Jonathan M Davis <jmdavisProg at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jmdavisProg at gmx.com
--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-10-05 17:24:56 PDT ---
An interesting side note to marking .ptr on arrays as unsafe would be that it
would make it kind of pointless to mark a lot of C functions as @trusted like
some folks have been trying to do in druntime (and incorrectly in some cases -
e.g. bug# 11168), since then the function making the call would likely have to
be marked as @trusted or @system quite often when calling C functions, as many
C functions take arrays. And many that don't take arrays still take pointers of
another kind, and taking the address of something is @system, so it makes me
wonder if we should just not mark any C functions as anything but @system. It's
already arguably bad to mark them as @trusted when we don't have their source
code, and when you pretty much can't call them from @safe code anyway, it
becomes rather pointless to try and mark them as @trusted.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list