May 17, 2013 Re: DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Thursday, 16 May 2013 at 19:52:51 UTC, Jonathan M Davis wrote:
> On Thursday, May 16, 2013 11:13:27 Regan Heath wrote:
>> So, who's responsibility is it to ensure the function/method call executes
>> without errors caused by mutable shared data?
>
> I think that for the most part, the question of thread-safety and const that
> you've been discussing is moot. const by itself is thread-local by definition.
> Whether you use const or immutable really has no impact on thread safety - not
> from the perspective of the function being called anyway. The only way that
> you can end up having to worry about thread-safety in such functions is if the
> caller casts away shared on a variable and then passes it to the function.
Very good point. "shared" has been paid minimal attention lately and I keep forgetting it actually can be used :)
|
May 17, 2013 Re: DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Thu, 16 May 2013 20:52:35 +0100, Jonathan M Davis <jmdavisProg@gmx.com> wrote: > On Thursday, May 16, 2013 11:13:27 Regan Heath wrote: >> So, who's responsibility is it to ensure the function/method call executes without errors caused by mutable shared data? > > I think that for the most part, the question of thread-safety and const that you've been discussing is moot. const by itself is thread-local by definition. Good point. Somehow I totally missed that. R -- Using Opera's revolutionary email client: http://www.opera.com/mail/ |
May 17, 2013 Re: DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 5/12/13, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote: > Again, I don't understand what the problem is. I understand now this is made this way to encourage discussions. I apologize if I sounded smug, it was uncalled for. |
May 17, 2013 Re: Broken web forums threading? [was: DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | On Thursday, 16 May 2013 at 08:08:37 UTC, Leandro Lucarella wrote:
> Thanks for pointing that out, but I think there is a problem with the
> forum software (I guess you are reading the NG using the web forums?).
> My client properly set the In-Reply-To: header. I checked manually the
> e-mail you replied to and have the correct Message-ID: of the post I was
> replying to in the In-Reply-To: header.
The problem is with Mailman, which is used to provide access to the newsgroups in the form of a mailing list. Mailman rewrites message IDs, so a mailing list user replying to a mailing list user will break threading.
Sidenote: your client does not support format=flowed, which causes text quoted from your posts to appear jagged.
|
May 21, 2013 Re: DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Fri, 10 May 2013 05:08:09 -0700, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote: > Enjoy! > > https://www.youtube.com/watch?v=mPr2UspS0fE > > Andrei Thanks. I noticed a subtle error in the response to the question on logical const (at 32:11). Specifically, overloading the function on immutable doesn't allow you to 'know' that the object you are passed is const or not, as prior to the invocation of the function (and thus overload determination) an immutable object could be bound to a const reference. As an alternative, IIRC, the RTTI of a class can be introspected inside the function to determine mutable/immutable at runtime. |
May 22, 2013 Re: DConf 2013 Day 1 Talk 2: Copy and Move Semantics in D by Ali Cehreli | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Jacques | On 05/21/2013 04:58 PM, Robert Jacques wrote: > the response to the question on logical const (at 32:11). I think 31:22 is more precise. Ali |
Copyright © 1999-2021 by the D Language Foundation