Just as an additional note ... God forbid you ever have to make some kind of change to all or most of your unicode strings that use "u" -- You can't exactly do a "Find in Files" for "u" and expect to not sift through a LOT of results that aren't what you're looking for. Even searching for u" (to denote the u right before the opening quote) would still bring back a ton of white noise in a good number of applications that I've seen.
Jeremy -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Coallier Sent: Thursday, July 19, 2007 8:19 PM To: Stanislav Malyshev Cc: [EMAIL PROTECTED]; internals@lists.php.net Subject: Re: [PHP-DEV] POSIX regex On 7/19/07, Stanislav Malyshev <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] http://www.zend.com/ > (408)253-8829 MSN: [EMAIL PROTECTED] > > -- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php