Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63451 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32741 invoked from network); 16 Oct 2012 10:44:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2012 10:44:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=amaury.bouchard@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=amaury.bouchard@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: amaury.bouchard@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:54087] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/5B-10021-59A3D705 for ; Tue, 16 Oct 2012 06:44:39 -0400 Received: by mail-ob0-f170.google.com with SMTP id ni5so6517888obc.29 for ; Tue, 16 Oct 2012 03:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=NBjwd7uiK4rNxdPxh7ZiLN6CeiGhw0Uz/c5kctoA/G4=; b=JKyFb73VxYPFYxaULOHBVBxg1l+B1Nm64REvGR02AaE0mVdLY0KaNGrs4mOkvu2nbh jtAK5MYiswge8IbeIraFJOvgMISdi424haQmK4PK7EVfgWR3llSlIVYXoSUumem6Q0e4 SW4F2hIfleUmAhCoJ/ssV2BCKVdxE6HGvcPfNAeHL4RF5DITJ9GD5tkcl2yyJJ0JH6My 8Xqh8HVXZ4bT6Pu65p1UrFXU/LiRYKYVavwo6wo2/f8Zv2Ef3mHxT3+rdohG+B16WPIb pPbTJuVOxDCRdRpJ8mjieP0aLQSigKQw4UNbYhOlfG1m3gNQu5OitVa78rZHJZa2txWV O6BQ== Received: by 10.60.7.73 with SMTP id h9mr12239049oea.13.1350384275416; Tue, 16 Oct 2012 03:44:35 -0700 (PDT) MIME-Version: 1.0 Sender: amaury.bouchard@gmail.com Received: by 10.182.24.169 with HTTP; Tue, 16 Oct 2012 03:44:15 -0700 (PDT) In-Reply-To: <507D2FB3.3030806@sugarcrm.com> References: <9570D903A3BECE4092E924C2985CE485612B6434@MBX202.domain.local> <507D133A.4040701@sugarcrm.com> <507D2FB3.3030806@sugarcrm.com> Date: Tue, 16 Oct 2012 12:44:15 +0200 X-Google-Sender-Auth: gSmI6ZBQJKEnG_l2IMQlSDXYSF8 Message-ID: To: Stas Malyshev Cc: Levi Morrison , Clint Priest , "internals@lists.php.net" , "Nikita Popov (nikita.ppv@gmail.com)" Content-Type: multipart/alternative; boundary=e89a8f9218e00be86604cc2ad785 Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 : Typehints / Accessor Syntax From: amaury@amaury.net (Amaury Bouchard) --e89a8f9218e00be86604cc2ad785 Content-Type: text/plain; charset=ISO-8859-1 2012/10/16 Stas Malyshev > Also, the fact is that other dynamic languages do not > have strong typing. It may be they just aren't smart enough to recognize > everybody needs it - or there may be a reason why it doesn't happen. I > think there is a reason > > > Doing the same for object properties (always optional) could be very > useful. > > Not really, since PHP is not a compiled language and as such does not > have static type controls. Now not only every foo($bar) can blow up but > also every $foo->bar = $baz. Not very useful. > If the first could be useful, the second could be useful too. Or you are saying that parameters type hinting was a bad idea? You can argue using other languages' design choices, but it shouldn't drive our own choices. Every methods and properties are public in Python; it doesn't mean PHP is doing wrong (nor Python is doing wrong). Last thing: I agree with Clint and you. If it was early checked, it would be better. But the current type hinting is far better than nothing at all. Yes, we can't "lint" it, but it was pretty useful a big number of times in my company. was outlined some 9000 times here on the list. > OK, sorry for the trouble. --e89a8f9218e00be86604cc2ad785--