Mac Apps That Use Garbage Collection Must Move to ARC

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 23 10:08:14 PST 2015


On 2/23/15 3:27 AM, Walter Bright wrote:
> On 2/23/2015 1:50 AM, Manu via Digitalmars-d wrote:
>>> 1. Increment and decrement, ESPECIALLY DECREMENT, is EXPENSIVE in
>>> time and
>>> bloat because of exceptions. Swift does it by NOT HAVING EXCEPTIONS.
>>> This is
>>> not an option for D.
>>
>> This is going to sound really stupid... but do people actually use
>> exceptions regularly?
>
> It doesn't matter if they do or not. It's a feature of D, and has to be
> supported. The only time it won't matter is if the intervening code is
> all 'nothrow'.
>
>
>> You say that's a terminal case? Generating code to properly implement
>> a decrement chain during unwind impacts on the non-exceptional code
>> path?
>
> Since you don't believe me :-), write some shared_ptr code in C++ using
> your favorite compiler, compile it, and take a look at the generated
> assembler. I've asked you to do this before.
>
> It's necessary to understand how exception unwinding works in order to
> pontificate about ARC.

BTW: http://asm.dlang.org

Andrei



More information about the Digitalmars-d mailing list