Re: Scalar Type Hinting

From: Date: Wed, 07 Mar 2012 13:23:36 +0000
Subject: Re: Scalar Type Hinting
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-58740@lists.php.net to get a copy of this message
Christian, On Wed, Mar 7, 2012 at 3:22 AM, Christian Kaps <christian.kaps@mohiva.com> wrote: > Hi, > > I'm with Stas here. > > First let me say that I would like to see type hinting for scalars in PHP. > As a userland developer it would help me to write clean and more robust > code. But I think this proposal is only a workaround to get a round the main > problem. It's a try to push similar functionality into PHP without breaking > BC. I think it's the wrong way. Again, the lack of a BC break is a side-effect of the main limiting factor which was to allow for stricter checks in the future and keep some semblance of a sensible syntax (having foo(int $foo) allow foo("5") makes a lot less sense to me)... > Anthony, You addressed one of the main issues in your last post. > > >>> Again, I personally see casting data-loss a bigger issue than just >>> parameter hinting, which should get its own RFC to clean up. That's why I >>> didn't include it here. On purpose... > > > Why not try to change this first? The simple reason, is that I was under the impression that one or more devs were writing that proposal. I was going to let them. If they have stopped, or want my help, or want me to do it, I'm all for that... Thanks, Anthony

« previous php.internals (#58740) next »