Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92486 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20289 invoked from network); 19 Apr 2016 19:39:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2016 19:39:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.52 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.52 mail-pa0-f52.google.com Received: from [209.85.220.52] ([209.85.220.52:35190] helo=mail-pa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/95-22821-E7986175 for ; Tue, 19 Apr 2016 15:39:43 -0400 Received: by mail-pa0-f52.google.com with SMTP id fs9so9644173pac.2 for ; Tue, 19 Apr 2016 12:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=ITr7595nXTLq7umx+0o+CMRR9FCpjcxhKi6ucJiOyqE=; b=gE0ZxRtAwfwtsfN6Sw9S0J+LkJVm9nw/V3mm3YwDs6SryIMjLLTSlEel6EEHXhmU5A 2iMSdDahwBnSa01Y+nCkqse6eS1HMfsddWtyF4peRalh8J9/p/ZooXb13npYncJLE/2A mOPnFjz7+tzljQfTJi6KidWc8iF8QrNzmkllG9r5NukUumNskuBwBbQs6oRm54GattWv tPmkw/Z+a9JXdYaSkc7B6c/B9Izn6aWW0TA58/YvEen5YZ91SqmTxhmzGbzRg+OEWC2K Uh1tpbixpjj2cnhX4tIjQ0JZ62oxYQNltPd8nRYJBXo8uE8RBgLHD/unanmxRusrELT+ hrnQ== 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:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ITr7595nXTLq7umx+0o+CMRR9FCpjcxhKi6ucJiOyqE=; b=g7KXghkz3fRf5icezpgEfUUgA0aUu+nNL1O90h1IVxvLYUT+8ELqkJa+hlTedTF6NT 8fM1Q/3a6So38iUIflnwB3+kO6RbNXslPJYF0OyFUnP7AUoyBV7cXCEFlbpvBYEPkb7e jIXwztcYrhdREbZlpPMORqH6GjYzexqcKmABSUGrkUcUkpHeGszFkxax9wQLVSui4Mem rVKNf4vj8ybnzLmByLzple+ZbHhs821SG0+144ExdbkGrJeWLETtD5yPRrPg5NLpjSJL nAEVMpx/OO8lgOlx5ZAFEvziRHRmvn/S0UTCS+FP1q451tiQzdD5JqGbS6qtqqLxqsKM fuuA== X-Gm-Message-State: AOPr4FX8OU3SIAdVZcdGmSiFdG6li5H6jgpdW5HiKwQULqV2uPyEuRiFQGd28Afn4XbhBw== X-Received: by 10.66.138.16 with SMTP id qm16mr6670249pab.28.1461094780100; Tue, 19 Apr 2016 12:39:40 -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 p189sm72260415pfb.51.2016.04.19.12.39.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Apr 2016 12:39:38 -0700 (PDT) To: bishop@php.net References: <571581C7.7010901@gmail.com> <571589AF.3090502@gmail.com> <5716755E.1040807@gmail.com> Cc: PHP internals Message-ID: <57168975.8090202@gmail.com> Date: Tue, 19 Apr 2016 12:39:33 -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: 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! > Except these two are in separate libraries that cannot share an interface. If these are separate libraries, you can't be sure that method does the same thing, or even that it will be existing in both. > An interface is not possible: separate libraries. Duck-typing is not > appropriate: only these two specific classes are supported. This looks very strange and brittle design - two random classes from two unrelated libraries, which you rely on have exactly the same functionality and keep it that way. Not a robust design if you ask me. Also, it looks strange why only those two random classes can be converted to arrays but none others can. What if you had third class that also can be converted to array? What if you had 20 of them? Again, looks like brittle and ad-hoc design. -- Stas Malyshev smalyshev@gmail.com