D Article: Memory Safety

jmh530 via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Jan 20 07:28:05 PST 2016


On Wednesday, 20 January 2016 at 14:04:53 UTC, Jakob Ovrum wrote:
> The article aims to explain how to use @safe, @system and 
> importantly, @trusted, including all the hairy details of 
> templates.
>
> https://jakobovrum.github.io/d/2016/01/20/memory-safety.html
>
> Any and all feedback appreciated.

I like the description of @trusted and template inference. 
Template inference, in particular, was not something that was 
obvious to me when first reading about D. I'm not sure how clear 
you make it that you can still mark templates @safe and what have 
you (you seem to just say don't make templates @trusted).

I wasn't aware of the point that "@trusted nested functions in 
templated functions do not have to have a memory safe interface 
as long as all calls to the function are memory safe". 
Interesting.


More information about the Digitalmars-d-announce mailing list