DIP65: Fixing Exception Handling Syntax
Brian Schott via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 16 22:44:25 PDT 2014
On Thursday, 17 July 2014 at 04:41:14 UTC, Walter Bright wrote:
> On 7/16/2014 4:04 PM, safety0ff wrote:
>> On Wednesday, 9 July 2014 at 23:14:49 UTC, Brian Schott wrote:
>>>
>>> If I'm understanding this correctly, you want to deprecate
>>> the (somewhat
>>> popular) nameless exception syntax so that we can keep the
>>> "should be removed
>>> with prejudice" catch-everything syntax?
>>
>> Is this the bottom line? Is DIP65 formally rejected? ping...
>
> Unless a convincing counter argument emerges, yes.
I'll just go over the existing arguments because I think they're
strong enough:
1. LastCatch is (in the opinion of many people) a misfeature.
2. LastCatch syntax is not used in Phobos.
3. LastCatch syntax is very, very trivial to update with a "dfix"
tool.
4. The unnamed exception syntax is used 25 places in Phobos.
5. Making the spec consistent with itself[1] introduces a parse
ambiguity.
This makes tooling D more difficult.
[1] "If just type T is given and no variable v, then the catch
clause is still executed." Previously I was just reading the
grammar spec and didn't catch this, but it turns out that this
syntax IS present in the spec and has been for many years. Your
plan of deprecating this syntax will break FAR more code than my
plan for correctly documenting it.
More information about the Digitalmars-d
mailing list