Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58823 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3352 invoked from network); 9 Mar 2012 15:04:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2012 15:04:56 -0000 Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:57850] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/10-02228-71C1A5F4 for ; Fri, 09 Mar 2012 10:04:55 -0500 Received: by yhfq11 with SMTP id q11so1008768yhf.29 for ; Fri, 09 Mar 2012 07:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=eVm9ALbxGb3kvbUJU3SuQp5RLmXn9/7EHmQJzARevFY=; b=oLirpPAV6+IRtxDBdE+TuHgSVB5q9qYb0hbr2iJwPHtrEXVPKXF4Q+ersarrqVTmQX iEWlSPDAxkndQOEensOqUwKOJHBx2siUne1vFCINSOuTG80tVuKbkLM+7gF4u1J6Vo4m 4CJOLmhBE7xgAOWwi6/odebdMABR22IqXnJ8Ya4uE4dIv8BeFpUsYG0yJ/qe+J9mI3uQ RIn5oJiusD9ERaGq2RI3819OdLqmfwa6zJHA3UGUVuYg4e/3jGzJcDj18op5xe7opd9o 8GxxJyPHq9+Nk44Q2upS2oDSv2qXSfXOW6h2jUeLg6nIlxntdBjNSgesjjak9n/IfRsZ J3LA== Received: by 10.236.76.198 with SMTP id b46mr2658075yhe.25.1331305492209; Fri, 09 Mar 2012 07:04:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.146.144.35 with HTTP; Fri, 9 Mar 2012 07:04:31 -0800 (PST) In-Reply-To: References: Date: Fri, 9 Mar 2012 16:04:31 +0100 Message-ID: To: Anthony Ferrara Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=20cf300fb3a7f3614604bad0b65e Subject: Re: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters From: linepogl@gmail.com (Lazare Inepologlou) --20cf300fb3a7f3614604bad0b65e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > What other types (except from other classes)... I was talking about other classes... Of course, this does not have to be implemented right now, but the syntax should not close the door for something like that in the future. > If the magic is useful, why not add the ability? Because it is ugly and limited. All the resent discussion resulted to the fact that type casting is one of the central features of PHP that we cannot live without. So I think that the mechanism to expand type casting should be promoted, even with some special new syntax. :-) Lazare INEPOLOGLOU Ing=C3=A9nieur Logiciel 2012/3/9 Anthony Ferrara > Lazare, > > On Fri, Mar 9, 2012 at 8:54 AM, Lazare Inepologlou > wrote: > > Yes, like that, only better. Since automatic type casting is central in > PHP, > > as this is evident after all this discussion, I believe that it should = be > > better supported. There are two thinks that I would like to see here: > > > > 1. No more magic methods, please. > > Any particular reason? If the magic is useful, why not add the > ability? I'm not saying we should get to python level with the shear > number of magic methods, but to artificially limit when useful > behavior can be added... I'm not so sure... > > > 2. It should cover (eventually) casting to and from any type. > > This doesn't? What other types (except from other classes) would you > like to see (or could we do besides resource and null)??? > > Anthony > --20cf300fb3a7f3614604bad0b65e--