Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63449 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29972 invoked from network); 16 Oct 2012 10:38:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2012 10:38:36 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.51 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.51 relay-hub201.domainlocalhost.com Received: from [74.115.204.51] ([74.115.204.51:27040] helo=relay-hub201.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/BA-10021-7293D705 for ; Tue, 16 Oct 2012 06:38:36 -0400 Received: from MBX202.domain.local ([169.254.169.44]) by HUB201.domain.local ([192.168.68.45]) with mapi id 14.02.0283.003; Tue, 16 Oct 2012 06:37:36 -0400 To: Stas Malyshev , Amaury Bouchard CC: Levi Morrison , "internals@lists.php.net" , "Nikita Popov (nikita.ppv@gmail.com)" Thread-Topic: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints / Accessor Syntax Thread-Index: Ac2qzY+DOufQVWL6SD+H4hb0hYe1QwAMw7qAACUsCAAAA/73gAAAQDkAAAcWJvA= Date: Tue, 16 Oct 2012 10:37:34 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE485612B6CB7@MBX202.domain.local> References: <9570D903A3BECE4092E924C2985CE485612B6434@MBX202.domain.local> <507D133A.4040701@sugarcrm.com> <507D2FBA.6090008@sugarcrm.com> In-Reply-To: <507D2FBA.6090008@sugarcrm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.21] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints / Accessor Syntax From: cpriest@zerocue.com (Clint Priest) I would have to agree with Stas, the type hints that are presently implemen= ted are failed code waiting to be found. Good luck if you're not monitorin= g your error logs. I can agree with the concept of wanting to avoid having= to do all kinds of simple verification of input parameters but thankfully = type hinting is optional. I think if it had been done differently, at least when possible, such that = errors occurring during compile time and thus could be -linted it would hav= e been much more useful, re: the concept of fail early. -Clint > -----Original Message----- > From: Stas Malyshev [mailto:smalyshev@sugarcrm.com] > Sent: Tuesday, October 16, 2012 4:58 AM > To: Amaury Bouchard > Cc: Levi Morrison; Clint Priest; internals@lists.php.net; Nikita Popov (n= ikita.ppv@gmail.com) > Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints= / Accessor Syntax >=20 > Hi! >=20 > > Not necessarily strongly typed. (sorry to land on this topic > > afterwards) As I see PHP, it's a language that can be used as an > > informal scripting language, but also as a rock-solid modern tool. >=20 > I have no idea what "rock-solid modern tool" means, though PHP is trivial= ly a modern tool by being a tool and existing right now ;) >=20 > > Type hinting in parameters is a really good thing, and it doesn't > > transformed PHP in a strongly typed language. >=20 > It however gave a permission to people to try sneak in strong-typedness t= hrough various backdoors arguing exactly that: "but we > have strong typing for parameters, why not for other things?" I think it = is not the right approach. Also, the fact is that other dynamic > languages do not have strong typing. It may be they just aren't smart eno= ugh to recognize everybody needs it - or there may be a > reason why it doesn't happen. I think there is a reason, which again was = outlined some 9000 times here on the list. >=20 > > Doing the same for object properties (always optional) could be very us= eful. >=20 > Not really, since PHP is not a compiled language and as such does not hav= e static type controls. Now not only every foo($bar) can > blow up but also every $foo->bar =3D $baz. Not very useful. > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227