Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92310 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66745 invoked from network); 14 Apr 2016 18:59:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2016 18:59:54 -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.177 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.177 mail-pf0-f177.google.com Received: from [209.85.192.177] ([209.85.192.177:36358] helo=mail-pf0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/20-64966-9A8EF075 for ; Thu, 14 Apr 2016 14:59:54 -0400 Received: by mail-pf0-f177.google.com with SMTP id e128so48494008pfe.3 for ; Thu, 14 Apr 2016 11:59:53 -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=LFebkCCbwsxPx7ADuJK2CWjYFWTydUXGo+PdVdfuzwI=; b=ZY3S+khURr0k5+iBLXn/fcPBVzk4gBllk7PJi8IaQVm/Fz53lf8OJJvrRkHM/k8/QZ 9A+2Fb0cbY1ZhmQfGzn4asQE/lwVh+nA53fH6zNWzM8xdm7TCh0laeaybFm694Ten3cj 5bngKqskvyC1uRLEEFWanGCEoWZ/WNM3K/lFcYzIzJ0viDeaYWHNbdAzKR63rf47BEfn hgz0IhRUAoo5QgPH+a+8PaCyishZ826wf/gchSmGU2J7uUV092c0ScnLvpnhwn+Cu8MH USOL0KCp3f6whBN0AewhKs+RUeIAOpG53wKzwrv3DYXF/N/2KsdjbX81mLAYnuKAZNbe I22Q== 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=LFebkCCbwsxPx7ADuJK2CWjYFWTydUXGo+PdVdfuzwI=; b=SEP8W3YPoS41m/Yq0IwNh+40WOyeyg+3wXnuez0zQeln/WpK0aqnHCbQ/n+qbYLS27 /mxkf/dTxln36BuwQYi2FRMa1C3WusyuSmQatpP1UpE0VhzlBseBHfmVeZAP3p1SQnLU BNYwZHKk1g6cS2OVBI7hT3ZRkDrwY3fdGXkhs5QiadXkn6JWGZfQc4bFNIsLfZC/Ki+u 35hurc460eOa3i/HovMB3mqG6PpU34yjWBHVd8ySvFxC6qTCpkHnrUg+KpjFE1JS1Dql rf/WxW458xsvriSkQZ7Mpy1q85T8WK4ztOO0qHBY6hdlik6+3b7tF74yugjUu85Xb/GL 8uQA== X-Gm-Message-State: AOPr4FUZL5UBn28iEVqwDJehqOCD2T3KG8M5l/BJFJRI+FQHzKesmIeC4JYWhjHBoEwPew== X-Received: by 10.98.18.195 with SMTP id 64mr23517358pfs.131.1460660390827; Thu, 14 Apr 2016 11:59:50 -0700 (PDT) Received: from stas-air.corp.wikimedia.org (tan1.corp.wikimedia.org. [198.73.209.1]) by smtp.gmail.com with ESMTPSA id w62sm59518773pfa.79.2016.04.14.11.59.48 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2016 11:59:49 -0700 (PDT) To: internals@lists.php.net References: <570E99AC.3090804@fleshgrinder.com> <570EA5EB.8090501@fleshgrinder.com> <570EAB0D.6080706@gmail.com> <570EB67E.8010908@garfieldtech.com> <5B147E88-CC0A-4CBC-A49D-C7FE3BF557C0@zend.com> <6F.C3.12455.94C5F075@pb1.pair.com> <20160414094440.GF19347@phcomp.co.uk> <570FD94F.90703@fleshgrinder.com> Message-ID: <570FE8A9.4020809@gmail.com> Date: Thu, 14 Apr 2016 11:59:53 -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: <570FD94F.90703@fleshgrinder.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Improving PHP's type system From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I don't know what is complicated about "string|Stringable" or "Foo|Bar" > since it is super self-explanatory. However, I find myself checking the It may be self-explanatory for you. It's much less self-explanatory for somebody just starting to learn. It is also very dangerous - if it's either Foo or Bar, can you call Foo::stuff on it or not? If it's string or not string, can you call strlen on it? Etc., etc. It adds a lot of cognitive load and complicates the whole picture. You may have a specific use case where it is useful (which we have yet to see btw) but please remember it's a language with literally millions of use cases and users. > docs (IDE or online) in which order I need to pass arguments to one of > the various mixed up functions in the core all the time. Which takes about 0.5 seconds. Can we please not waste time on discussing argument order some 9000th time? > PHP is not easy, it has so many quirks that one needs to know of that > you could make a PhD only for that. PHP has some quirks, but it doesn't take PhD to look up argument order in a manual. Anyway, having super-complicated type algebra does not help any with argument order, so I'm not sure why it's brought here at all. > https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ > > This contains A LOT of that stuff. Oh, could we please stop referring to this list of nitpicks each time we discuss the language? About 90% of it is not worth the bytes spent on it for discussing it again and again. Using it as some kind of magic "some guy wrote article bashing PHP, therefore my proposals need to be accepted" card makes no sense at all. -- Stas Malyshev smalyshev@gmail.com