January 21, 2016
On Thursday, 21 January 2016 at 13:42:13 UTC, Jakob Ovrum wrote:
> On Thursday, 21 January 2016 at 13:39:48 UTC, Dicebot wrote:
>> I'd suggest at the very least to add a comment before "p.bar();" saying "Must not escape 'p' pointer or @safe-ty will be compromised".
>
> I thought about this case, but it relies on UFCS which is controlled by the callee. The caller can't inject that call if the callee is careful with its imports.
>
> For member functions, the this reference is `ref` and its address cannot be taken in @safe code.

Reasonable, but the UFCS call can result from some other function defined in same module (Phobos modules are not small at all). Even small unlikely violation can completely destroy benefits of @safe so in my opinion one can't be overly cautious when documenting stuff that requires verification.
January 21, 2016
On Thursday, 21 January 2016 at 13:52:57 UTC, Dicebot wrote:
> Reasonable, but the UFCS call can result from some other function defined in same module (Phobos modules are not small at all). Even small unlikely violation can completely destroy benefits of @safe so in my opinion one can't be overly cautious when documenting stuff that requires verification.

I agree. Do you think it's worth mentioning UFCS functions in the article?
January 21, 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.

Nicely written, enjoyed reading it.

And the visual presentation is excellent, I guess because it's based on github's code presentation libraries.  Really a nice example of how you can find blog posts online that are an order of magnitude better than any book you've ever read, particularly the visuals.

Is it on reddit?  The dlang.org redesign, Walter's talk, and a couple other D topics did well on there this week, I think this would also.
January 21, 2016
On 01/20/2016 09:04 AM, 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.

Good work, thanks! Has this been reddited yet? -- Andrei

January 21, 2016
On Thursday, 21 January 2016 at 17:39:11 UTC, Andrei Alexandrescu wrote:
> Good work, thanks! Has this been reddited yet? -- Andrei

I don't think so. Personally I don't think I have a reddit account, but people are more than welcome to post it wherever they like :)
January 21, 2016
On Thursday, 21 January 2016 at 17:42:02 UTC, Jakob Ovrum wrote:
> On Thursday, 21 January 2016 at 17:39:11 UTC, Andrei Alexandrescu wrote:
>> Good work, thanks! Has this been reddited yet? -- Andrei
>
> I don't think so. Personally I don't think I have a reddit account, but people are more than welcome to post it wherever they like :)

Someone has submitted it (about a half hour ago): https://www.reddit.com/r/programming/comments/420yhi/memory_safety_in_d/
January 21, 2016
On Thursday, 21 January 2016 at 17:56:19 UTC, Brad Anderson wrote:
> On Thursday, 21 January 2016 at 17:42:02 UTC, Jakob Ovrum wrote:
>> On Thursday, 21 January 2016 at 17:39:11 UTC, Andrei Alexandrescu wrote:
>>> Good work, thanks! Has this been reddited yet? -- Andrei
>>
>> I don't think so. Personally I don't think I have a reddit account, but people are more than welcome to post it wherever they like :)
>
> Someone has submitted it (about a half hour ago): https://www.reddit.com/r/programming/comments/420yhi/memory_safety_in_d/

I've submitted it to Hacker News.
1 2 3
Next ›   Last »