3 ms·
When I first started programming, I didn't know which of the two symbols / or \ was "forward slash" or "back slash", so I got into the habit of calling them "up
by jazzyb 16y ago
When I first started programming, I didn't know which of the two symbols / or \ was "forward slash" or "back slash", so I got into the habit of calling them "uphill" and "downhill", respectively. I still tend to use those terms when I'm working with people who aren't computer savvy, and those terms tend to be a bit more intuitive and help avoid confusion.
- jpadkins 16y agouphill and downhill assume going left to right. forward slash and backslash both assume going left to right. How is this an improvement? Maybe call them right-slash and left-slash, with the lean prefix implied? This would probably help our right to left language friends.
- RodgerTheGreat 16y agoCall me biased, but every programming language I'm aware of that isn't related to Piet[1] or Befunge[2] reads from left to right, and both of those are gag options. Programming languages in general take their cue from English, so it doesn't seem that unreasonable to me to assume that programmers know enough English to assume left to right. [1] http://www.dangermouse.net/esoteric/piet.html [2] http://en.wikipedia.org/wiki/Befunge
- jazzyb 16y agoI'm a little ashamed to admit it, but I always had a hard time remembering where the "hinge" was on the slashes. Let me explain: Assume that the slash begins like a pipe |. If the slash has a hinge at the bottom (like most people intuitively assume), then / is "leaning forward" and \ is "leaning back". However, if, when you look at the slash, you assume the hinge is on the top, then it looks like / is "swinging back" and \ is "swinging forward". So until I figured out where people were putting the "hinge", "back" and "forward" seemed arbitrary. I know it sounds strange, but it was a great source of confusion for me. Edit: The phrase "lefty loosey, righty tighty" also confused me until I figured out that "left" and "right" were relative to the direction that the top of the screw/bolt moved, not the bottom.
- lambda 16y agoIt has nothing to with where the 'hinge' is. '/' is just 'slash'; it's the only one that existed before computers. '\' was invented so you could write the mathematical symbols for 'and' and 'or' as /\ and \/. Since it is a backwards version of the slash, it was named 'backslash,' and 'forward slash' later came about in analogy with 'backslash.'
- larrik 16y agoWow. "Uphill" and "downhill" are brilliant. I hope I remember that next time I need it. I tend to use "the slash with the question mark" and then either "the slash near backspace" or "the slash NOT near the question mark", since the backslash keyboard position isn't completely standard. Of course, these experiences are when dealing with having to have an end user type them in (thank you, internet).