Re: POSIX regex
| From: | David Coallier | Date: | Fri, 20 Jul 2007 02:18:46 +0000 |
| Subject: | Re: POSIX regex | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31126@lists.php.net to get a copy of this message | ||
On 7/19/07, Stanislav Malyshev <stas@zend.com> wrote:
Yeah I also like that casting better than the "u" It's different things. Casting means "create string as binary, then in runtime cast it to unicode", u"" means "this string is unicode". --You are right that casting means string -> binary, and that runtime cast to unicode means a string is unicode, however, after speaking with many php developers (not internals), the same answer always come up "It's ugly". Does that simply mean that it's ugly ? I believe not, it means that it's also unreadable, unclear at first look, and easy to overlook. One solution that I could foresee would be to recognize (unicode) within a function call. Ex: strlen( (unicode) "Óglaig"); This would runtime-cast Óglaig to a "unicode string". Expected answers: 1) I don't find it to be useful and better than "u" A: It is more readable, easier to find/notice and simply cleaner. 2) No A: Ok.. 3) It's going against the usual casting standard of (type) A: True The decision probably has been made already and if so just let me know and I'll stop trying to rise a voice for the community :P And no, I do not have a patch ;-)
Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com-- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18