4 ms·
This article remind me of my first days of C coding and the problems generated with escaped "c:\haracters in strings". After years I still think that the use o
by program 15y ago
This article remind me of my first days of C coding and the problems generated with escaped "c:\haracters in strings".
After years I still think that the use of forward slash is the worst decision ever. At least Apple chose ":" on Mac OS classic.
- harshreality 15y agoIf you're referring to \ it's a backslash not a forward slash.
- vacri 15y agoIn my time supporting naive endusers, it's always amused me that people at a level where they have trouble with left and right mouse buttons can remember slash and backslash like pros.
- RegEx 15y agoA simple way to remember forward/backslash (which I probably read on HN) is the phrase "Backslash is by the backspace" Edit: This is for the standard US keyboard. A more general way of thinking about it, though a bit more to remember: associate "positive" with "forward", and see that '/' has a positive slope. Or just go listen to a BBC podcast, and let the sound of the broadcaster saying "bbc dot co dot uk forward-slash newspod" resonate in your head.
- danielgrieve 15y agoBut it isn't by the backspace... in fact it's almost the furthest from it! Probably depends on your keyboard layout though.
- brudgers 15y agoReminds me of many discussions I would have explaining how to invoke a particular DOS command to people whose MO was "dir" and then violently mashing <break> to allow themselves to page through a large directory. "File slash" and "option slash" were far less confusing than decoding the secretary's concept of "forward" and "back."
- jodrellblank 15y agoOn a UK keyboard, it's by left shift, making slash closer to backspace.
- pbhjpbhj 15y agoBackslash is near L-Ctrl on my keyboard. Forward slash is far closer to backspace. Perhaps a better way would be to think (for L-to-R language users) of the charater toppling "forwards" / or "backwards" \ WRT the text direction.
- pasbesoin 15y agoEchoing parent, in different words: English is left-to-right. (And gravity is down.) Is the slash "leaning forward" or is it "leaning backward".
- aparadja 15y agoAlt-shift-7 on a Finnish Mac keyboard. Took me a while to find it the first time.
- xxpor 15y agoTalking about the BBC: sometimes they say stroke instead of slash, which as an American, really confused me the first time I heard it.
- rue 15y agoIt doesn't really make sense. Given we use a left-to-right and up-to-down, \ can be seen slashing forward in writing direction, starting from the top, and / backward. Upslash / and downslash \ would make more sense, but this is what we have. My mnemonic is that forward and back are the opposite of what makes sense.
- RegEx 15y agoThere's no one right way to remember something. I'm glad you found something that works for you!
- meepmorp 15y agoI think of them as pipes that are falling over. The backslash falls backward and the forward slash falls forward.
- dlitz 15y ago"Forward slash" is a goofy name anyway. There are: - "slash": the character you use in English and when typing fractions; and - "backslash": the Microsoft-slash: backwards, like everything else they do. Another way to remember is that (at least on US keyboards) the slash is always in the same place (on the same key as the question mark). The backslash, being the oddity that it is, is in different places, depending on the keyboard vendor.
- mmisu 15y agoFortunately today you can use string literals with most programming languages.
- yuhong 15y agoThe comments has the story on that, which involved IBM.