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:59 PST 2015


On 2/23/15 4:30 AM, Russel Winder via Digitalmars-d wrote:
> On Mon, 2015-02-23 at 19:50 +1000, Manu via Digitalmars-d wrote:
>> O[…]
>> This is going to sound really stupid... but do people actually use
>> exceptions regularly?
>> I've never used one. When I encounter code that does, I just find it
>> really annoying to debug. I've never 'gotten' exceptions. I'm not sure
>> why error codes are insufficient, other than the obvious fact that
>> they hog the one sacred return value.
>> D is just a whisker short of practical multiple-return-values. If we
>> cracked that, we could use alternative (superior?) error state return
>> mechanisms. I'd be really into that.
> […]
>
> Return codes for value returning functions only work if the function
> returns a pair, the return value and the error code: it is generally
> impossible to work with return values that serve the purpose of return
> value and error code. C got this fairly wrong, Go gets it fairly right.

Urgh. Product types masquerading as sum types. Give me a break will ya. 
-- Andrei



More information about the Digitalmars-d mailing list