Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85573 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55096 invoked from network); 30 Mar 2015 23:46:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2015 23:46:37 -0000 Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:54187] helo=ns73.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/70-51287-B50E9155 for ; Mon, 30 Mar 2015 18:46:36 -0500 Received: (qmail 16320 invoked from network); 31 Mar 2015 01:46:32 +0200 Received: from cpe90-146-82-12.liwest.at (HELO RoLaptop) (90.146.82.12) by ns73.kreativmedia.ch with ESMTPSA (AES256-SHA encrypted, authenticated); 31 Mar 2015 01:46:32 +0200 To: "'Lazare Inepologlou'" , "'Christoph Becker'" Cc: "'Zeev Suraski'" , "'PHP internals'" References: <3a939905cd5a06158c9e99d8af26e596@mail.gmail.com> <55197A0E.8050203@gmx.de> In-Reply-To: Date: Tue, 31 Mar 2015 01:46:31 +0200 Message-ID: <008301d06b43$bff96d80$3fec4880$@tutteli.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHiNVLj++xbq2GcCuh4y/IfJMptuwHy8qJrAmcr+fOc70kH4A== Content-Language: de-ch Subject: AW: [PHP-DEV] Re: Naming of 'weak' type hints From: php@tutteli.ch ("Robert Stoll") > -----Urspr=C3=BCngliche Nachricht----- > Von: Lazare Inepologlou [mailto:linepogl@gmail.com] > Gesendet: Dienstag, 31. M=C3=A4rz 2015 00:01 > An: Christoph Becker > Cc: Zeev Suraski; PHP internals > Betreff: Re: [PHP-DEV] Re: Naming of 'weak' type hints >=20 > Zeev Suraski wrote: >=20 > > One thing that I think we should change is how we refer to the = =E2=80=98weak=E2=80=99 > > type hints. The word =E2=80=98weak=E2=80=99 has a negative ring to = it, and > > considering this is how the language behaves across the board = it=E2=80=99s a > > pretty bad name for this feature. >=20 > Borrowing from C#, I would suggest the names implicit and explicit = argument types. There is nothing "weak" about them, > they just do an implicit conversion which can be quite powerful if = used correctly. > [Robert Stoll]=20 It's probably hard to come up with something which does not conflict = with another concept, but implicit and explicit typing is used to refer = to two sub categories of static typing. Explicit typing refers to code = which requires explicit type specifications written by the user and = implicit typing is the case where type inference infers the types. I am not so sure if it is clever to use an own name for type hints when = strict_types=3D1 since the type hint as such is not different, the = context is different. I am think about it in the sense that a function = has different overloads and depending on the context some are available = and others are not (similar to the callee of a method call, = strict_types=3D1 can be seen as another argument). But I guess that is = too complicated for a documentation. Nevertheless, I would put emphasis = on the fact that the context is different.=20 > In the future, I hope that we will have implicit object conversions in = addition to the scalar ones. [Robert Stoll]=20 That would be nice :) >=20 >=20 >=20 > Lazare INEPOLOGLOU > Ing=C3=A9nieur Logiciel