This reminds me of
   $var = something or die();

So if you do follow with braceless-try, I would have
   try something() catch($e) do_something_with($e);

Or (a bit simpler, but assumes we have a new pseudovariable $e),
   try something() or do_something_with($e)

I don't like the form with a semicolon, because what if there are two
semi-colons after the statement? What does the try statement wrap?
   try something();; catch ($e) { ... }

The whole concept breaks away from the tradition of wrapping massive
blocks with try { } statements, and might make applications use
exceptions a LOT more freely. Something to keep in mind.

Jevon

On Fri, Jul 20, 2012 at 12:30 AM, Lester Caine <les...@lsces.co.uk> wrote:
> Peter Beverloo wrote:
>>
>> Other bracket-less blocks allow authors to shoot themselves in the foot
>> equally so, yet PHP supports these as well. The actual problem here is an
>> inconsistency in the parser, which I'd consider to be a bug.
>
>
> Having been caught out too many times now when adding an extra part to code
> there 99% of the blocks are correctly wrapped ... when I see code without
> the brackets they get added! The bug as far as I am concerned is NOT
> reporting them missing but just getting them displayed in eclipse would do
> me for now ;)
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to