Slashdot Mirror


PHP Gets Namespace Separators, With a Twist

jeevesbond writes "PHP is finally getting support for namespaces. However, after a couple hours of conversation, the developers picked '\' as the separator, instead of the more popular '::'. Fredrik Holmström points out some problems with this approach. The criteria for selection were ease of typing and parsing, how hard it was to make a typo, IDE compatibility, and the number of characters."

4 of 523 comments (clear)

  1. Well, That Does It! by maz2331 · · Score: 0, Flamebait

    OMFG - this addition is just so horrid that everyone's going to give up on PHP and start coding Web apps in C++ through CGI interfaces again. /Sarcasm

    Seriously, who cares what charater they are using? Developers are smart enough to adapt.

  2. Re:The BASIC of the 21st century by Anonymous Coward · · Score: 0, Flamebait

    Notice how he said "when people ask me", meaning he's just yet another college guy who has done a few pages for some club or whatnot and therefore thinks he's hot shit. He has obviously never worked in a professional development environment, where the technology used to create the web front end is largely totally irrelevant as that layer is given so little control that anything will work. I get happy just thinking about this guy then he leaves his college with his worthless degree, getting hit right in the face when he comes out and realizes that web developers are the IT world's equivalence to fluffers in porn.

  3. Re:Gripe Moan Bitch and Holler! by siride · · Score: 0, Flamebait

    Let me know when C has closures and introspection. Sure, you can do it, but the result is so ugly and messy it severely obscures the meaning of the code. That, my friend, is the problem with C. Unless you really really need that last ounce of performance, or you are writing systems software, C is almost never a good choice.

  4. Re:what wrong with by Anonymous Coward · · Score: 0, Flamebait

    Just like one would expect....

    Except that it's lousy parsing. PHP should never have allowed anyone to expect that in strings, given that it HAS the ${...} construct.

    It's just a shitty shortcut that's lived forever, like how text that isn't a function and isn't in quotes is a string anyway, which is what makes $foo.one impossible, because it would be parsed as $foo . "one".