Re: Call it: allow reserved words in a class or not?

From: Date: Thu, 06 Nov 2008 12:33:59 +0000
Subject: Re: Call it: allow reserved words in a class or not?
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-41720@lists.php.net to get a copy of this message
Dan,
PHP may be a hybrid language, but the fact is you're implementing object oriented functionality, and as such should be implementing it in a way that follows de-facto standards in object oriented language design. I should be able to overload your internal array object, and yes, arraysshould be objects.
I'm really confused as to why you'd want to overload something that doesn't exist. Can't we just deal with reality here? Several million PHP scripts written over the last decade will still able to run without change under PHP 5.3. Several PHP developers are not OO programmers and some - maybe even most - never will be. Don't you think that suddenly turning arrays into objects might cause just the teeniest bit of a problem here?
Javascript would be a prime example of a non-standard object oriented approach, and yet that still manages to support the basics in a way that make sense.
Great, so drop PHP and go use Javascript. Oh wait - you can't. Because *it wasn't designed do the same job*. - Steph

« previous php.internals (#41720) next »