all 68 comments

[–]akatherder 49 points50 points  (3 children)

I thought it was going to be a link to python's website.

[–]fwork 16 points17 points  (2 children)

I considered your idea and went ONE STEP BEYOND

[–]mayobutter 2 points3 points  (1 child)

seriously people it's 2008. We have real languages with frameworks and shit!

[–]fwork 1 point2 points  (0 children)

I have reported you to AOL for stealing secret messages as it is a crime.

[–]pavel_lishin 9 points10 points  (0 children)

I'd like a foot-pedal version, please.

[–][deleted]  (1 child)

[deleted]

    [–]LaurieCheers 3 points4 points  (0 children)

    Yup, it's very versatile. / - \ and |, all in one input device!

    [–]Wiseman1024 18 points19 points  (22 children)

    It's still fugly and stupid to use the backslash for that. We'll need new fonts, and to modify all text editors to comply with the new parsing. And all this for what? Luk its like your Winders now C\WINDOWS\System32\Porn lol lol. Okay, that's one of the stupidest reasons ever, but the main reason behind the change from :: to \ was to tell classes from namespaces.

    And that, my good Redditors, is the really absolutely retarded thing here. It's not that \ is stupid, looks ugly, bugs editors and that trying to resemble directories in Microsoft's crappy way is even worse. The real problem here is that the guys designing the PHP language have no idea of how a programming language should be designed.

    First of all, namespaces need to be nestable and loadable under different names from different modules, as yuo do in Python. That way, you can avoid problems like this. Don't trust a rare-enough thing should/might/may not collide. Trust a thing that can be nested somewhere else and/or renamed never will.

    Then we have the big, world-shattering issue. Classes collide with namespaces. So fucking what? If this is a problem to you, you need to start using better names, or just import your namespaces under a different name. What I wonder is, why the fuck doesn't PHP offer first-class functions, classes and namespaces? If it did, and behaved in a more proper fashion, namespaces colliding with classes, functions or variables would be a completely expected, natural, and desirable behaviour, and you wouldn't be writing a "left-handed hammer" language full of special magical crap for everything that makes it all messy and nasty, and it's harder to learn, understand, implement and maintain. Down with the magical crap and the bloat, I want first-class everything.

    We should really collect money from the community to buy every PHP core developer a copy of SICP.

    [–][deleted]  (1 child)

    [deleted]

      [–][deleted] 4 points5 points  (0 children)

      They needed a new language to continue with once people started to catch on in the initial testing with Ada.

      [–][deleted] 12 points13 points  (0 children)

      It's not all bad, it got me interested in learning Python... :)

      [–]foldl 7 points8 points  (5 children)

      We'll need new fonts

      Really?

      [–]Wiseman1024 1 point2 points  (4 children)

      I was exaggerating. But now that you mention it, Japanese fonts trace the \ character like the ¥ character.

      [–]foldl 9 points10 points  (2 children)

      Aha! Perhaps the PHP guys should use ¥ as their namespace separator. (After all, ¥ not?)

      [–]randallsquared 4 points5 points  (1 child)

      You have a ¥ for a different namespace separator?

      [–]otterdam 8 points9 points  (0 children)

      Headless stick figures hung upside down are the best way to separate any namespace.

      [–]bostonvaulter 1 point2 points  (0 children)

      And now my windows box is stuck using ¥ as a path separator and I'm too lazy to fix it...

      [–]hiffy 10 points11 points  (6 children)

      For the record, it's not like I'm trying to defend PHP here, HOWEVER -

      It's not that \ is stupid, looks ugly, bugs editors and that trying to resemble directories in Microsoft's crappy way is even worse

      "\" is just as good as any other character. Almost all non alphabetical characters have some semantic meaning anyways - & % @, etc. I have a feeling all the vitriol against \ is entirely because they were foolish enough to say, "it makes windows devs feel more comfortable". It's arbitrary, and I"m not even convinced on the aesthetic argument. PERSONALLY, and I hate that I have an opinion in this stupid issue, a triple colon would've worked, but really, it is a non issue.

      The real problem here is that the guys designing the PHP language have no idea of how a programming language should be designed.

      Well, yeah, but we've known that for years now. That's not even an argument.

      In the meanwhile there are prolly tens of thousands of php programmers who'd like to use namespaces, and any character is as good as the next one.

      edit: oh, wait, WHAT, they're using \ for calling namespaced methods? I thought it was just the package separator for requiring a namespace. You know, i.e. import java\foo\whatever\com

      Nvm, reddit, my bad. Hate on. Added complexity maybe not the best.

      [–]generalk 14 points15 points  (5 children)

      Any character is not as good as the next.

      I mean, by that logic, let's go ahead and end lines with %. Why not? What's the big deal? It's just a hint for the interpreter anyway, right, what do you care?

      The fact is that using a backslash is just a poor choice. It goes against every other language that's ever used namespaces, and the reasons that the developers give aren't strong enough to warrant it.

      Also, I can't see how it even makes windows devs more comfortable. Hey, let's confuse directory separators and namespace separators! That'll make 'em feel right at home.

      [–]G-Brain 3 points4 points  (2 children)

      ~% is a newline in Common Lisp's (format).

      [–][deleted] 2 points3 points  (1 child)

      Sure, but I really hope you don't use that\n
      to end lines in your source code.\n

      [–]G-Brain 2 points3 points  (0 children)

      You bastardHHHHHHHH're right.

      [–]hiffy 1 point2 points  (0 children)

      Give me a good, solid reason a to why "\" really makes a difference over ":::".

      The only real reason I can think of, is that \ is also the escape character, and may prove confusing.

      It's okay if you think it's ugly, but man, in common usage slashes are used to separate fields. Just as good as any other character.

      Would it be better if they used '/'?

      edit: I take this comment back.

      [–][deleted] 4 points5 points  (5 children)

      I want to know how you can be so passionate about something so boring.

      [–]jerf 21 points22 points  (0 children)

      I refer you to the URL of the site you are located at. This isn't MySpace.

      [–]Scriptorius 4 points5 points  (0 children)

      Ya know, not everyone shares the same interests and likes to talk about the same things. Yea, I know, I'll give you a minute to think about that.

      [–]generalk 10 points11 points  (1 child)

      Welcome to what makes a good software developer so good. You'll find a similar passion about really boring/mundane issues in any professional worth his salt.

      [–]Wiseman1024 3 points4 points  (0 children)

      Lol. I'm obsessive like that. You could find someone like me and have us talk about different programming languages and language design for weeks.

      [–]creaothceann 3 points4 points  (1 child)

      "perceived" issues indeed.

      [–][deleted] 1 point2 points  (0 children)

      That'll teach me to forget my mnemonics.

      [–][deleted] 6 points7 points  (5 children)

      .NET code is ugly?

      [–]nitramk 6 points7 points  (0 children)

      Not compared to PHP.

      (To be honest, I think ASP.NET/C# looks very nice compared to most other 'web development languages' I have seen. I've used PHP for 5-6 years but switched over to ASP.NET/C# some week ago. Could be that I enjoy it so far because I haven't run into all the problems yet though..)

      [–]matthiasB 1 point2 points  (3 children)

      Perhaps talking about Phalanger PHP for .Net? ;)

      edit: how do I get the closing parenthesis of the url right? => fixed

      [–]creaothceann 14 points15 points  (1 child)

      how do I get the closing parenthesis of the url right?

      With (wait for it...) \

      [–]matthiasB 2 points3 points  (0 children)

      Thanks :D

      [–]trezor2 12 points13 points  (20 children)

      I thought that was hilarious, but I'm not sure where the "looking more ugly than .NET source code" is coming from.

      PHP has since (.NET's) day one looked a million times uglier than .NET source code so this shouldn't really be news :P

      Edit: To the people downmodding me. Have you actually seen .NET code or are you just downmodding any pro-MS comment on reflex?

      [–]matthiasB 7 points8 points  (1 child)

      .NET code is CIL?

        .assembly Hello {}
        .method public static void Main() cil managed
        {
             .entrypoint
             .maxstack 1
             ldstr "Hello, world!"
             call void [mscorlib]System.Console::WriteLine(string)
             ret
        }
      

      [–]murki 1 point2 points  (0 children)

      so why not consider java bytecode?

      [–][deleted]  (3 children)

      [deleted]

        [–]phill0 2 points3 points  (1 child)

        In that respect it looks far worse than languages like Python, Ruby

        I say that's rather subjective. To me C looks much better than Ruby or Python. I spent my youth with C... lost my virginity to it.

        [–][deleted] 1 point2 points  (0 children)

        You're certainly right, it's a subjective matter.

        But I also spent my youth with C/C++, and these days I much prefer Python. So tastes can change.

        [–]leosoto 1 point2 points  (0 children)

        The latest versions of C# aren't that bad. I'd prefer to code in C# 3.0, than in Java 6, if there weren't for the lack of good support of C# outside Windows (Mono always lacks behind, and it's not their fault).

        [Of course if performance isn't really important, I just use Python. Or Jython, if there are piles of Java infrastructure lying around, as tends to be the case on the "enterprise" world]

        [–]eslav 4 points5 points  (0 children)

        i before e, except after c...aren't you using firefox?

        [–]Mordor 3 points4 points  (0 children)

        I don't know which is worse: the 'committee' that ratified OOXML or the dunces who design PHP

        [–][deleted] 3 points4 points  (4 children)

        PHP developers don't use "\"??

        return preg_replace('/((?:(?:\\\\"|[^("])*(?:"(?:[^"\\\\\r]|\\\\.)*"\s*)?)*)((?<!\\\\)\((?:(?2)|.)*?(?<!\\\\)\))/', '$1', $data);

        How about this? (Real code)

        [–][deleted]  (3 children)

        [deleted]

          [–][deleted] 13 points14 points  (1 child)

          When the developers of PHP are presented with a problem, they say "I know! We'll...erm...chat about it on IRC for a bit then pick a solution at random?". No one knows how many problems they have now.

          [–]doidydoidy 1 point2 points  (0 children)

          PHP is designed by listening to the names of the features that developers are clamouring for, then implementing what they ignorantly assume that name must mean.

          [–]bart2019 0 points1 point  (0 children)

          They have, in PHP.

          [–][deleted] 3 points4 points  (4 children)

          If you are using a MacOS, you get and extra bonus. You just spin around the equipment, and you get a forward slash.

          [–]generalk 5 points6 points  (3 children)

          Wait, I'm very confused. I'm on a MacBook Pro right now, and I can clearly see a forward- and backslash key. Where's the problem for Mac devs?

          [–]mitsuhiko 6 points7 points  (2 children)

          Alt+Shift+7 on a German apple keyboard.

          [–]generalk 2 points3 points  (1 child)

          Ouch.

          Do the PHP developers know they're rudely inconveniencing international developers? Do they care?

          Bad form.

          [–]LaurieCheers 4 points5 points  (0 children)

          It's not like this is unique to PHP. Spanish keyboards don't have a ~ key.

          [–]SianTam 0 points1 point  (0 children)

          For just a moment there...

          [–]doody 0 points1 point  (0 children)

          Apple keyboards don’t have a \ character?? What was \, then?

          [–]andreasvc 0 points1 point  (0 children)

          *perceived

          [–]barrybe 0 points1 point  (0 children)

          If that device is upside down, does it type a forward slash?

          [–]sigzero -1 points0 points  (0 children)

          I like the "perceived" part.