Skip to content
DevMeme
3343 of 7590
OperatingSystems Post #3672 · source on Telegram

When even Michael Jackson can’t decide on path separators across OSes

Description

The meme shows two stacked stills of a famous dancer in a white suit performing his gravity-defying lean: the top frame leans left and is annotated on the right with a single forward-slash “/”, the bottom frame leans right and is annotated with a backslash “\”. Beneath both images, bold black text reads: “After all these years, I still don’t know which should I use when writing a path”. The visual gag mirrors the constant pivot developers make between Unix-style “/” and Windows-style “\” path delimiters, a nuance that rears its head in shell scripts, build pipelines, and cross-platform tooling. The meme resonates with seasoned engineers who have resorted to path.join utilities, double-escaping in JSON, or outright cursing when a CI job fails because the slash leaned the wrong way

Comments

46
Anonymous ★ Top Pick Some teams refactor monoliths; the rest of us are still refactoring ‘/’ into ‘\\’ just to make the same build pass on Windows - talk about technical debt with 50-year amortization
  1. Anonymous ★ Top Pick

    Some teams refactor monoliths; the rest of us are still refactoring ‘/’ into ‘\\’ just to make the same build pass on Windows - talk about technical debt with 50-year amortization

  2. Anonymous

    After 20 years of writing cross-platform build scripts, I've mastered every design pattern except one: the Observer pattern that watches me type 'C:/Users\Documents/project\src' and silently judges my inconsistent path separators

  3. Anonymous

    The path separator debate is the developer equivalent of the tabs vs spaces war, except it's actually enforced by the OS kernel. You can write `os.path.join()` or `pathlib.Path()` all you want, but deep down you know there's a raw string literal with a hardcoded separator lurking somewhere in your codebase, waiting to break on the first Windows CI runner. The real smooth criminal move? Using forward slashes everywhere and letting Windows silently accept them in most APIs while your Linux colleagues remain blissfully unaware of the chaos you've avoided

  4. Anonymous

    Senior take: the only correct separator is whatever path.join/Path.Combine/std::filesystem returns - hand‑typing slashes is a cross‑platform regression in waiting

  5. Anonymous

    By 20+ years in, the only slash I choose is whatever path.join returns - every other choice becomes a Friday postmortem titled: “C:\ wasn’t /.”

  6. Anonymous

    MJ mastered the lean; Windows mastered '/' support in '95. Unix devs still can't escape the drama

  7. @sashakity 4y

    forward slash. it's cross platform and you don't need to put two of them.

    1. Deleted Account 4y

      +

    2. Deleted Account 4y

      which one is forward slash?

      1. @RiedleroD 4y

        the opposite of the backwards slash

      2. @RiedleroD 4y

        forward slash is the one that's easier to type on the keyboard

      3. @sashakity 4y

        /

  8. @chekoopa 4y

    Windows is the only back-slash domain, IIRC

    1. @kitbot256 4y

      DOS?

      1. @chekoopa 4y

        Yes, too

    2. @CcxCZ 4y

      OS/2 CP/M Also there's locale fun such as ¥ But nowadays I'm not aware of many systems that try to not have at least some semblance of POSIX compat that are not RTOSes

  9. @Dexconv 4y

    Backslash for windows Forward slash anywhere alse

  10. @Vanilla_Danette 4y

    Lmao, true. I always forget

  11. @mrybs1 4y

    / если linux \ если windows

    1. @sylfn 4y

      Translation: use / on linux use \ on windows Please use English in this chat and do not violate the rules

      1. @mrybs1 4y

        Sorry

    2. @RiedleroD 4y

      what if you wanted to program something cross-platform…? Answer: don't bother, every sensible library uses /

      1. @mrybs1 4y

        you can make two versions, one with / and the other with \. #define SLASH "/" and then #define SLASH "\"

        1. @feskow 4y

          or use std::filesystem

        2. @sashakity 4y

          / works on windows too, you don't need to do that

        3. @sylfn 4y

          you have fucked up second define, you chould have written #define SLASH "\\" because backslash has to be escapee

          1. @mrybs1 4y

            understood. I'm just on Linux

            1. @sylfn 4y

              it doesnt matter when you print \n you get a newline how to print backslash? double backslash.

              1. @mrybs1 4y

                Ok

  12. @RiedleroD 4y

    perfect

  13. @r_beat 4y

    I would add automatic disk format and Linux installation to this code. 🙃

  14. Deleted Account 4y

    i have both at the same key

    1. @RiedleroD 4y

      huh?

    2. @RiedleroD 4y

      On my kbd it's shift+6 for forward and altGr+(+) for backwards

  15. @RiedleroD 4y

    bruh

  16. Deleted Account 4y

    \ | /

  17. @Dobreposhka 4y

    on my laptop keyboard it is the same

    1. @RiedleroD 4y

      seems to be the standard for English keyboards then

  18. @Diotost 11mo

    Someone needs to build a time machine and "convince" cp/m developer to not use / for command options.

  19. Deleted Account 11mo

    Windows: \ unix: /

    1. @TheFloofyFloof 11mo

      Windows: \ insane: /

      1. @deadgnom32 11mo

        and to use for escape sequences?

        1. @TheFloofyFloof 11mo

          /

          1. @TheFloofyFloof 11mo

            I choose violence today

          2. @deadgnom32 11mo

            but powershell uses `

      2. @pyrothefuck 11mo

        path\to\directory even looks atrocious and unnatural to me

Use J and K for navigation