[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Andi Gutmans
At 08:42 AM 3/28/2003 -0500, Sterling Hughes wrote: This again gets to my nit regarding runtime features in a dynamically typed language. One of the reasons type checking in C, C++, Java is a good thing is its done at compile time, not runtime. Type mistakes, especially in large libraries can be

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Andi Gutmans
At 08:59 AM 3/28/2003 -0500, Sterling Hughes wrote: Pah, we all know the future is psp (http://www.edwardbear.org/mod_psp-0.3.tar.gz ;-) psp sucks badly :P Just to be clear: I'd be happier without type hinting then type hinting throwing an E_ERROR (a E_WARNING would also make me happy). The proble

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Brian Moon
| I don't like E_ERRORS when there is no real reason to bail out. | As I've already said, non of the other PHP functions trigger E_ERROR | when the parameters are incorrect; it's just an E_WARNING and a NULL | value return. This is a good point. foreach for example issues a warning. So do all th

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Zeev Suraski
At 11:35 31/03/2003, Per Lundberg wrote: On Sat, 2003-03-29 at 12:59, Zeev Suraski wrote: > Remember that we don't want to encourage exception based programming anyway. > Catching an exception should typically be the last thing done in a program, > right before it terminates. Writing exception-dr

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-04-03 Thread Stig S. Bakken
On Fri, 2003-03-28 at 16:36, Brian Moon wrote: > | The point is that the SOAP (or whatever) library will be interfacing > | with code written by others. If those other people use type hints and > | it blows up with an E_ERROR, we don't have a nice way to handle this > | error and continue serving.

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Brian Moon
| The point is that the SOAP (or whatever) library will be interfacing | with code written by others. If those other people use type hints and | it blows up with an E_ERROR, we don't have a nice way to handle this | error and continue serving. | | This *is* a disaster, because we are introducing a

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Andi Gutmans
At 03:00 PM 3/28/2003 +, Wez Furlong wrote: On Fri, 28 Mar 2003, Andi Gutmans wrote: > The point of type-hints is to be able to catch errors in your code > quickly and not having to write checks, the point isn't to catch > problems in your code at run-time. And as I said before, if it doesn't

Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2]Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Derick Rethans
On Fri, 28 Mar 2003, Sterling Hughes wrote: > Pah, we all know the future is psp > (http://www.edwardbear.org/mod_psp-0.3.tar.gz ;-) > > Just to be clear: I'd be happier without type hinting then type hinting > throwing an E_ERROR (a E_WARNING would also make me happy). I agree 100% here. Deric

Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Andi Gutmans
At 03:19 PM 3/28/2003 +0100, Derick Rethans wrote: On Fri, 28 Mar 2003, Sterling Hughes wrote: > Pah, we all know the future is psp > (http://www.edwardbear.org/mod_psp-0.3.tar.gz ;-) > > Just to be clear: I'd be happier without type hinting then type hinting > throwing an E_ERROR (a E_WARNING wou

Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Andi Gutmans
At 03:56 PM 3/28/2003 +0100, Sebastian Bergmann wrote: Andi Gutmans wrote: > OK so maybe we should go ahead and nuke it and save us the argument. Please, no. The main problem is that people are getting carried away and instead of looking at the big step forward the OOP model has done since PHP 4

Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Steph
> Changing PHP's behavior with a different error level is only a tad bit > better than adding an INI directive. In general I'd like the core language > to behave the same no matter what error level or INI settings. > I say nuke type-hints and let the purists use instanceof. > > Andi > Speaking as

Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-28 Thread Andi Gutmans
At 10:57 AM 3/28/2003 -0500, Sterling Hughes wrote: On Fri, 2003-03-28 at 10:52, Andi Gutmans wrote: > At 03:56 PM 3/28/2003 +0100, Sebastian Bergmann wrote: > >Andi Gutmans wrote: > > > OK so maybe we should go ahead and nuke it and save us the argument. > > > > Please, no. > > The main problem