RE: [PHP-DEV] I think that "Function naming inconsistency" bug deservers more attention

From: Date: Mon, 28 Jan 2013 08:09:16 +0000
Subject: RE: [PHP-DEV] I think that "Function naming inconsistency" bug deservers more attention
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-65225@lists.php.net to get a copy of this message
> You can write String class all by yourself, put it on github and once virtually > everybody is using it, we'd gladly discuss including it as a standard extension. In userland we can only do something like $str = new String('my_string_class'); echo $str->length(); But that's useless. It would be great if method calls on primitive types could be supported, like in Nikic' proof of concept (https://github.com/nikic/scalar_objects). $str = 'my_string_class'; echo $str->length(); I would really like to see that in PHP. It's not only a nicer and shorter way to code but it would also be a solution for the function naming inconsistency ;-) Best regards Christian -----Original Message----- From: Stas Malyshev [mailto:smalyshev@sugarcrm.com] Sent: Saturday, January 26, 2013 7:39 PM To: Thomas Bley Cc: internals@lists.php.net; Rasmus Lerdorf Subject: Re: [PHP-DEV] I think that "Function naming inconsistency" bug deservers more attention Hi! > So function aliases, new open tag and deprecation are bad. What about > the String class? Design it, write it and we'll see how it works. It's not like the process should *start* with including it in PHP core. You can write String class all by yourself, put it on github and once virtually everybody is using it, we'd gladly discuss including it as a standard extension. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.internals (#65225) next »