DIP65: Fixing Exception Handling Syntax

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 28 12:12:48 PDT 2014


On 07/25/2014 11:34 PM, Walter Bright wrote:
> On 7/25/2014 2:53 AM, Jakob Ovrum wrote:
>> On Friday, 25 July 2014 at 09:39:23 UTC, Walter Bright wrote:
>>> That can be special cased, too.
>>
>> Seriously? Where does it end?
>>
>> catch(MyTemplatedException!true) {
>> }
>
> That one can't be special cased in the parser.

I'd suggest to just special case the general thing, or not add any 
special cases at all.

catch(Type)
      ^~~~~~

I.e. use lookahead to determine whether something that looks like a type 
follows a '(' token and is itself followed by a ')' token.


More information about the Digitalmars-d mailing list