Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92441 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12441 invoked from network); 19 Apr 2016 05:10:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2016 05:10:49 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.170 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.170 mail-pf0-f170.google.com Received: from [209.85.192.170] ([209.85.192.170:36637] helo=mail-pf0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/34-11975-8DDB5175 for ; Tue, 19 Apr 2016 01:10:49 -0400 Received: by mail-pf0-f170.google.com with SMTP id e128so2800041pfe.3 for ; Mon, 18 Apr 2016 22:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=K+ppI9MCrY4J8Dqwdo/RsUQtj+YlWs8LZXLzJSl3pOo=; b=j56ScrO+25N0MmN5fNEfjIw5EZQXHPLeNkXu7apIYecHycI91IpQf5gbQjSEpdAxrl qLg8IelGH0qPE+QvP8caetJsEzVqpaFpFKfHAb5A8Plzw5E4FlaX6LUzHQxrQ+NYCsT7 lmBuMQdC2L6ogwylYRraEkqIhsH6Crn0+hbPZddaQeZMqm1S2EXTqFwd7LoNZOzxX4t3 vlupNxjg56BRSdaM9ajN3sbsrqJB97RhfF7kKHDzA+KtAL2RRU4sOYFOAi8igl8LcEav LHoDG7hsSN+T54meowg35C6SWnutsRvMzn3I/MIZuokFuW1PpdGJlS02kD+0jQ/adUJb B8Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=K+ppI9MCrY4J8Dqwdo/RsUQtj+YlWs8LZXLzJSl3pOo=; b=ZxdVq/XIjDkkmWHt7/5A1AHL5xFPDaXzFaqlMcRPA01ZbaNjhZW7omyHe6FNs6nZ5H 5Le/SgtJENL7U8y/NpHE53HI8Wc84E1F+RY3fx0Dv7ujvXuP0EFSeKfiG+VOIINmqjHc R8+rfp+192Xt60uXzy3gjLgknAOvQ+zsdupD/r/TO5RPMzBAe/kzjyFKr/oNgLP1YFFC JUnw3c0OPQmtPiVDykJP1+vIS7jIQeNjELoTeUPUOJlriv5STlqy9ZcEXYl73MzwnTyF 2Xh2+Fo/LK0c66cxJBbiw3bL+hox/xerJsznWga9BACXDtRdZ88cxYDvrwQosvq4K7Gg mxRA== X-Gm-Message-State: AOPr4FXsc1ijjkeKi1kcULkirATBML+YBMllKJs1DAXyjb/8fz4/mnPoHXU9Z8AknaPbtA== X-Received: by 10.98.91.198 with SMTP id p189mr1345438pfb.91.1461042645548; Mon, 18 Apr 2016 22:10:45 -0700 (PDT) Received: from Stas-Air.local (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id l6sm13562505pfb.12.2016.04.18.22.10.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2016 22:10:44 -0700 (PDT) To: Larry Garfield , internals@lists.php.net References: <571581C7.7010901@gmail.com> <571589AF.3090502@gmail.com> <57159F7D.3050200@garfieldtech.com> Message-ID: <5715BDD1.8000507@gmail.com> Date: Mon, 18 Apr 2016 22:10:41 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <57159F7D.3050200@garfieldtech.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Catching Multiple Exception Types From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Admittedly Foo|Bar is of limited use, although there is some use. > Foo&Bar, however, has plenty of uses. That is a different topic, not related to exceptions at all. > I do agree with the sentiment that having Foo|Bar for catch but not for > function signatures is going to confuse people. Confuse which people? Do people now are confused that you can write multiple catch clauses for same exception but can't write multiple function bodies for same parameter set? Are they confused by the fact that it's a fatal error to pass wrong type to a function but catch just silently ignores it? Are they confused that you can write function(string $a) but you can't catch(string $a)? I don't think so. I think people are pretty good at figuring out exceptions and function parameters are different things. Java has multiple catch and no expression types, and .net has the same after a fashion (with somewhat weird syntax) but programmers on neither wonder around confused expecting to find type calculus somewhere. -- Stas Malyshev smalyshev@gmail.com