Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49304 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8325 invoked from network); 11 Aug 2010 01:42:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2010 01:42:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 209.85.161.42 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:42088] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/93-20356-8EFF16C4 for ; Tue, 10 Aug 2010 21:42:01 -0400 Received: by fxm14 with SMTP id 14so1216628fxm.29 for ; Tue, 10 Aug 2010 18:41:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.119.198 with SMTP id a6mr19110659far.66.1281490916831; Tue, 10 Aug 2010 18:41:56 -0700 (PDT) Received: by 10.223.6.28 with HTTP; Tue, 10 Aug 2010 18:41:56 -0700 (PDT) In-Reply-To: <4C61F488.1090806@sugarcrm.com> References: <4C61D401.3050006@sugarcrm.com> <20100811002328.GB26237@mig9.immomigsa.ch> <4C61F488.1090806@sugarcrm.com> Date: Tue, 10 Aug 2010 21:41:56 -0400 Message-ID: To: Stas Malyshev Cc: Kalle Sommer Nielsen , Internals , Derick Rethans Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Strict typing From: ilia@prohost.org (Ilia Alshanetsky) Sounds like a reasonable name change. PHP never really had "type-hinting" since even array or Object type "hints" would throw out any value that didn't precisely match the requested type by the method/function declaration. On Tue, Aug 10, 2010 at 8:53 PM, Stas Malyshev wrote: > Hi! > >> Might be the time to rename what we currently call "type hinting" then. >> Because what we currently have is strict typing as well. > > Maybe. The term "hint" was inexact from the start, as hint means (Collins > English Dictionary): > > 1. a suggestion or implication given in an indirect or subtle manner he > dropped a hint > 2. a helpful piece of advice or practical suggestion > 3. a small amount; trace > > That's clearly not what is going on - there's nothing subtle or indirect > there and there's not a suggestion - it's a strict and unequivocal > definition of type expected for the function call. > > But with its use in 5.3 it didn't matter since it was clear what we are > talking about and there was no possibility of confusion. Right now what we > have is a classic strict typing, albeit not required for all places but > f(int $f) in PHP would be the same as f(int i) in C, so calling them > differently would only lead to confusion. Maybe we should have called it > "parameter typing" or something like that from the start. It didn't seem > important back then because everybody agreed what it means. Obviously it is > no longer the case. > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >