Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61482 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67691 invoked from network); 19 Jul 2012 12:55:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jul 2012 12:55:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=jevon@jevon.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jevon@jevon.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain jevon.org designates 50.116.3.249 as permitted sender) X-PHP-List-Original-Sender: jevon@jevon.org X-Host-Fingerprint: 50.116.3.249 jevon.org Received: from [50.116.3.249] ([50.116.3.249:51503] helo=jevon.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/08-25752-DD308005 for ; Thu, 19 Jul 2012 08:55:58 -0400 To: PHP internals Date: Thu, 19 Jul 2012 05:55:10 -0700 Envelope-To: internals@lists.php.net References: <5007D707.2070100@hoa-project.net> <095CAA408DA94AFB9E75C12877A9043D@charliesomerville.com> <5007FDD1.8040706@lsces.co.uk> Message-ID: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by jevon.org; Thu, 19 Jul 2012 05:55:13 -0700 Received: by wgx1 with SMTP id 1so1875237wgx.11 for ; Thu, 19 Jul 2012 05:55:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.240.134 with SMTP id e6mr1125557wer.211.1342702511047; Thu, 19 Jul 2012 05:55:11 -0700 (PDT) Received: by 10.180.94.36 with HTTP; Thu, 19 Jul 2012 05:55:10 -0700 (PDT) Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Make try/catch brackets optinal From: jevon@jevon.org ("jevon") 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 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 >