Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101378 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16841 invoked from network); 19 Dec 2017 09:20:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2017 09:20:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 62.12.172.110 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 62.12.172.110 mail.gna.ch Received: from [62.12.172.110] ([62.12.172.110:58864] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/C0-10479-0D9D83A5 for ; Tue, 19 Dec 2017 04:20:18 -0500 Received: from [10.0.1.55] (77-56-180-37.dclient.hispeed.ch [77.56.180.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 536E92F1A9; Tue, 19 Dec 2017 10:20:14 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) In-Reply-To: <0ee72877-0978-95a2-d09c-85dcaf18a0b9@gmail.com> Date: Tue, 19 Dec 2017 10:20:13 +0100 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <0ee72877-0978-95a2-d09c-85dcaf18a0b9@gmail.com> To: Stanislav Malyshev X-Mailer: Apple Mail (2.3445.5.20) Subject: Re: [PHP-DEV] [RFC] Mixed Typehint From: cschneid@cschneid.com (Christian Schneider) Am 19.12.2017 um 09:49 schrieb Stanislav Malyshev : >> The current one isn't any convention, it's just not possible to do >> something else. There's nothing that explicitly allows saying "I = accept >> all types", rather than "The type I accept is unspecifed". >=20 > There could be of course logical constructions that are not supported = by > the type system. "mixed" however has the accepted meaning - and that > meaning is exactly the same as not specifying the type. I do not see = any > additional use of type that only means "unspecified type" - it looks > like its sole reason is so that somebody could say "I now have lots of > types in my code!" which does not seem to me a worthy goal. Types = should > serve a purpose, this one serves none. I agree, if you want to document that you code accepts mixed types you = could simple write /* mixed */, i.e. a comment. If you're talking about tool support then the tool could also support = this comment. Would not be unheard of either. - Chris