On Wed, Feb 23, 2011 at 4:29 AM, Stas Malyshev wrote:
> Hi!
>
>> public function Killjoy(MyEnum $x)
>
> What would be the purpose of such code? What would it do if 5 is passed as
> $x?
IMHO, it should fail (unless 5 is the value explicitly mentioned in
MyEnum definition)
--
Alexey Zakhlestin, h
I think it would be better just to fix the issue in the code. If you
run include 'My/Path/To/File.php' does it lowercase it? It does not.
The expected behavior would to not lowercase it. There are ways that
this could be fixed directly in the code. The only real requirement
that it looks like t
Hi!
public function Killjoy(MyEnum $x)
What would be the purpose of such code? What would it do if 5 is passed
as $x?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, v
After a little more thought, I'm doing a U-turn. I agree, type hinting is a
goer.
My previous thinking had been tainted by the talk of classes, and there is
potentially a lot of overhead in making an enum behave like a class.
However, there is very little overhead in supporting type hinting.
I would argue that type hinting here is worth the overhead. Here’s my support
for type hints:
1. They are optional – people truly concerned about squeezing every last
drop of performance can opt to not use them and are probably using an
accelerator anyway which will iron out such problems
I just don't get why no type hinting, I thought that was one of the big
points
so what are the purposes of the new enums?
could you provide an example (a little snippet) of the usage of them?
On Tue, Feb 22, 2011 at 11:15 AM, Ben Schmidt wrote:
> Can't remember whether I answered this clearly
Am 22.02.2011 13:54, schrieb Johannes Schlüter:
Revision: http://svn.php.net/viewvc?view=revision&revision=308482
Maybe I'm doing something wrong... But as of this change, I can't build
the CLI on Windows:
my mistake. I didn't test on windows but rev. 308564 should fix it. Will
test with VS t
Can't remember whether I answered this clearly. I don't think type hinting is
worth the implementation overhead (loss of efficiency) it would require.
Ben.
On 23/02/11 1:11 AM, Jarrod Nettles wrote:
Apologies - I wasn't suggesting we implement extension methods. I was simply
changing my min
Apologies - I wasn't suggesting we implement extension methods. I was simply
changing my mind and agreeing with the earlier point that methods for enums can
be useful.
What is everyone's opinion on enums as type hinted parameters? Being able to
do...
public function Killjoy(MyEnum $x)
-Or
Hi,
my mistake. I didn't test on windows but rev. 308564 should fix it. Will
test with VS tonight.
johannes
On Tue, 2011-02-22 at 13:32 +0100, Carsten Wiedmann wrote:
> Am 19.02.2011 17:04, schrieb Johannes Schlüter:
> > Revision: http://svn.php.net/viewvc?view=revision&revision=308482
> >
> > L
Am 19.02.2011 17:04, schrieb Johannes Schlüter:
Revision: http://svn.php.net/viewvc?view=revision&revision=308482
Log:
- Implement FR#53878 Interactive shell should work with shared readline
extension
# This is useful w/ distributors who like to build all things shared or don't
# provide the r
11 matches
Mail list logo