TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   The reason for PHP's lack of protocol (http://www.talkphp.com/general/1265-reason-phps-lack-protocol.html)

Wildhoney 10-01-2007 12:00 AM

The reason for PHP's lack of protocol
 
I was reading the following article yesterday. In admission it is a banal article with 2 interesting points, 1 is how PHP looked right at the beginning, and secondly, how PHP got in such a mess with its functioning naming - such as the mixture of function naming conventions, like str_replace and strpos.

I couldn't help but feel that the explanation the founder of PHP gave in that article was a mere cop out. The reason it got in such way, to me, is down to little to no planning. That's the mess you get in when you don't have clear instructions on what you're doing. You just keep adding things randomly when you need it.

See what you think. The segment is headed The Ugly Duckling of Programming Languages. Towards the end of the paragraph he goes onto mention something about sometimes you need an ugly solution to an ugly problem. I disagree. I think there's absolutely no need to have an ugly solution when you could have a pretty solution with a well-managed and properly planned out project. There is no excuse, in my eyes.

The solution for me is PHP should break all ties (thus sacrificing backwards computability) with the previous versions and risk breaking a lot of scripts when they upgrade their PHP. This, however, I feel, will never happen as people may begin to turn to other languages such as Ruby and Python instead of sticking with a language that has just turned their site on its head.

This is the greatest reason why PHP will continue to be added to and not thought out properly. I admire their revamp of OOP in PHP5, but the previous suggestion would be too big of a risk. With every passing day the decision to do this becomes more difficult.

Your thoughts?

Village Idiot 10-01-2007 03:15 AM

PHPs function names are messy, but renaming them without backwards compatibility will be substantially worse. Either way, PHP is far to big to just die, ruby and python just dont compare and asp.net doesnt run on apache.

PHP6 needs to begin a transition making all messy named functions the depreciated way, then eliminate them in a later version of 6.

Karl 10-01-2007 01:33 PM

If I had my way I'd introduce namespaces and release two versions of PHP 6, standard and extended. The extended could include the old functions, allowing backward compatibility to those that need it, while allowing those that don't a more efficient build.

Wildhoney 10-03-2007 11:21 AM

I like the idea, Karl. It's definitely something for PHP to think about, if they haven't already. As for as far as I know, PHP will not be heading in that direction. Another thing I'd like to see in PHP is casting variables as a certain type. This again, I feel, will never be introduced into PHP.


All times are GMT. The time now is 01:23 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0