DEV Community

Discussion on: The Windows CLI sucks, and that's good.

Collapse
 
tamas profile image
Tamás Szelei

I disagree with the basic statement of the article, i.e. people are forced to implement tools on Windows therefore it's good that the windows shell sucks. No, it's not good, and no, they are not forced to do that. And they don't. I can't tell you how many hours I wasted on debugging organically grown Windows batch scripts. They have terrible syntax and non-intuitive rules that make your head spin. Bad bash scripts are at least understandable and much better to work with.

The biggest sin of make is that it is easy to misuse and that newer techniques of the language have not been popularized enough. A modern and well-written Makefile is nice to work with, but they are few and far between. There are tasks (not only building software) that are very easy to express in make, where a dependency graph with processing is needed. For example, in rpclib I use make to build the documentation: one target calls doxygen, another calls and xslt script that amalgamates the XML output from doxygen, yet another takes that xml and processes it, etc. Changes will only re-run stuff that has to run again. I would have a hard time of implementing that in Python.

But: I do agree that shell scripts (be it windows batch or bash) are not a good fit for many workloads, apart from really small ones. Python is a good choice for replacing them, but this is not because the windows shell sucks.