Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Alexey Zakhlestin
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

Re: [PHP-DEV] Re: [PATCH] Bug #49852 & Bug #53065 - Adding spl_autoload_case_sensitivity()

2011-02-22 Thread Mike Willbanks
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

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Stas Malyshev
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

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Ben Schmidt
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.

RE: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Jarrod Nettles
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

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Martin Scotta
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

Re: [PHP-DEV] Re: svn: /php/php-src/trunk/ NEWS ext/readline/config.m4 ext/readline/readline.c ext/readline/readline_cli.c ext/readline/readline_cli.h sapi/cli/cli.h sapi/cli/config.m4 sapi/cli/config

2011-02-22 Thread Carsten Wiedmann
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

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Ben Schmidt
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

RE: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Jarrod Nettles
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

Re: [PHP-DEV] Re: svn: /php/php-src/trunk/ NEWS ext/readline/config.m4 ext/readline/readline.c ext/readline/readline_cli.c ext/readline/readline_cli.h sapi/cli/cli.h sapi/cli/config.m4 sapi/cli/config

2011-02-22 Thread Johannes Schlüter
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

[PHP-DEV] Re: svn: /php/php-src/trunk/ NEWS ext/readline/config.m4 ext/readline/readline.c ext/readline/readline_cli.c ext/readline/readline_cli.h sapi/cli/cli.h sapi/cli/config.m4 sapi/cli/config.w32

2011-02-22 Thread Carsten Wiedmann
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