Idea: Introduce zero-terminated string specifier

Jonathan M Davis jmdavisProg at gmx.com
Tue Oct 2 23:02:32 PDT 2012


On Wednesday, October 03, 2012 07:35:23 Jakob Ovrum wrote:
> > I suppose we could just use @trusted
> > and call it a day.
> 
> No, that would be abusing @trusted. The function would no longer
> be safe, *because it contains possibly unsafe code*. @trusted is
> for safe functions that the compiler cannot prove safe.

Yeah. You basically _never_ just mark @trusted and call it a day. You only 
mark something @trusted if you've verified that _everything_ that that function 
does which is @system is done in a way that's ultimately @safe. In particular, 
marking much of anything which is templated as @trusted is almost always just 
plain wrong.

- Jonathan M Davis


More information about the Digitalmars-d mailing list