Re: [RFC] Enum proposal (yet another)

From: Date: Thu, 23 Feb 2012 23:18:18 +0000
Subject: Re: [RFC] Enum proposal (yet another)
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-57991@lists.php.net to get a copy of this message
On 23/02/12 23:49, Kris Craig wrote: > Yeah I agree, that was one of the things I listed under > "disadvantages" lol. > > I guess my question is: Does this constitute a prohibitive problem, > or is it something that we can stomach? > > I mean, if you think about it, that's really what we're talking about > anyway, right? After all, when you're writing any application, you're > either going to be writing it with strict typing or you're going to be > writing it with dynamic typing. The only difference here is that > coders with either preference will both find PHP accommodating to > their style. > > > Similarly, a somewhat weaker argument could be made that, in PHP 5, > you're either coding for procedural design or for OO design > (technically you could do both, but I wouldn't wanna touch that > codebase with a ten foot poll lol). The only difference here is that > there would be a config setting to tell the interpreter which is which. > > --Kris I think you would get developers coding for strict, and hostings set to weak. Makes more sense to have it as a per file / per function attribute, so the author can choose if they want the values passed to it to be coerced or act as if they were doing a manual check and throwing an exception.

« previous php.internals (#57991) next »