[Dlang-study] [lifetime] Initial thoughts on lifetime management

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Oct 28 01:40:52 PDT 2015


On 28-Oct-2015 10:44, Jacob Carlborg wrote:
> On Wednesday, 28 October 2015 at 00:45:00 UTC, Andrei Alexandrescu wrote:
>
>> * embed an implementation-defined reference count as a hidden member
>
> I guess this answers my first question.

Just a short note on this: COM (which is the backbone of all new WinRT) 
would be nice to support as well and that means being flexible with 
where and how reference count is stored. Even putting aside COM & 
ObjectiveC - in some cases storing ref-counts in a separate block is 
advantageous and limiting ourselves to hidden embedded ref-count is not 
necessary.

In fact, compiler being aware of ref-counting helps these more 
complicated (and sometimes opaque) methods of re-counting b/c it would 
not be able to optimize then away otherwise.
>
> All the concerns mentioned above about Objective-C interoperability 
> can of course be special cased in the compiler, if needed.
>
> [1] http://forum.dlang.org/thread/l34lei$255v$1@digitalmars.com
>
> -- 
> /Jacob Carlborg
> _______________________________________________
> Dlang-study mailing list
> Dlang-study at puremagic.com
> http://lists.puremagic.com/cgi-bin/mailman/listinfo/dlang-study


-- 
Dmitry Olshansky


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3707 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puremagic.com/pipermail/dlang-study/attachments/20151028/8e144e93/attachment.bin>


More information about the Dlang-study mailing list