1. 38

  2. 11

    This gives me angry flashbacks to my last job.

    The entire build system was a snarling vortex of cross-referencing batch files. It looks almost like a reasonable language–a little barebones, sure. But then, terrible terrible traps await people trying to do things like manage exit codes.

    True comedy results if you have any of the ‘nix-style coreutils in your system path and are crazy enough to try to use them, because the union of cmd character escaping and coreutils character escaping leads to dark, dark places.

    Fuck. Cmd.

    1. 7

      I find it very odd he’s completely chucking out PowerShell. PowerShell, both as a scripting language and as an interactive shell, is actually one of the best environments I’ve ever used. It’s definitely not perfect, but it honestly gets a lot of things right. The trivial extensibility from .NET, the entire remoting/workflow system, things like Out-GridView, the Interactive Scripting Environment (ISE) for writing scripts…seriously, they really got a hell of a lot of things right.

      I’m really excited to have bash on Windows because it means that bash is now the lowest common denominator for a quick script (v. writing separate PowerShell/batch and bash scripts), but if you’re just talking about day-to-day usability, I don’t actually think bash helps a ton.

      1. 11

        Author here.

        I’m not sure what you mean when you say I’m completely chucking out PowerShell. I called it “the cure for polio” and Jeff Snover “the Jonas Salk of the Windows ecosystem”. To be completely honest, I feel like I was a little hard on Bash if anything.

        1. 5

          I think I took the first at least really differently; in context, I took it to mean “a great cure for something else” (i.e., fixing the wrong problem). I’ve heard a lot of devs say that (“it’s a better WSH, but we didn’t need a better WSH”, for example, or “It’s a better shell, but the console subsystem is still crap”, and so on), so maybe that’s where my head was at. The post being called “the Windows command line,” and not “cmd.exe”, seemed to cement that.

          At any rate, I wasn’t trying to mischaracterize your writing. People always glom onto random parts of my posts, extracting a meaning I not only didn’t intend but actively disagree with. Sorry I was the one doing it here.

        2. 1

          I don’t think he’s throwing it out per se, I just think he’s not really talking about it (and using a slightly click-bait-y headline.) I mean at the end he says your choices are batch, bash (now) and powershell. Fairly clearly only one of those is not the right choice anymore.

        3. 3

          Even when spending 99.5% of my development time on Windows, I feel more at home when running the Bash command line over the standard Windows command line. Batch scripts to me has some weird DOS-ish artifacts that would feel out of place for your typical command line.

          The only time I’ve had to deal with batch scripting was when I got a script that would mass convert file extensions within a folder, and that’s pretty much the only use case that it’s good for.

          Powershell took out most of the pain by introducing aliases that resembles its bash counterparts to some of the cmdlets, but the scripting language itself is a little too intimidating for me to dive deep into.

          1. 1

            :: is not really a comment so much as an unused label. REM and ' comments do not cause those problems.

            Parse-time expansion of variables is awful, I agree. EnableDelayedExpansion should be the default.

            1. -5

              I love it when authors use SCREAM CAPS to make their point. Actually, I don’t.

              Stories with similar links:

              1. How bad is the Windows command line really? via ngoldbaum 2 years ago | 1 point | 1 comment