4 ms·
Make is horrible because it does not handle spaces in paths Putting spaces in pathnames is idiotic to begin with. I have written Perl scripts that are 3x more
by waynecochran 8y ago
Make is horrible because it does not handle spaces in paths
Putting spaces in pathnames is idiotic to begin with. I have written Perl scripts that are 3x more complicated just to deal with spaces in pathnames. You might as well blame Make for not handling UTF-32 characters in pathnames -- I mean, someone might want to put a GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL (U+03FF) in their path -- Make would suck if it didn't allow this.
You missed the most egregious problem with Make -- the fact that commands must begin with a friggin' TAB! No other whitespace will do. Think of every manual writer who has to somehow convey that the whitespace you (don't) see is a TAB.
- tom_ 8y agoThe baffling thing about this opinion, at least to me, is that it's actually difficult not to handle spaces. Once you've got your path-with-a-space past the well-known issues involved with handling these in your average shell and/or make - which are stupid issues, but it's probably too late to do anything worthwhile about them by now - what's the problem? What are you going to do with paths that makes handling spaces so hard? This applies equally to Unicode characters. (Which I'd actually expect Make to handle OK. I doubt it uses UTF-32... presumably it's just char stars internally, like most Unix tools, so I'd have thought it would handle UTF-8 just fine. UTF-8 is a bit inefficient, but extremely well-designed in this respect.)
- nikofeyn 8y ago> Putting spaces in pathnames is idiotic to begin with. it’s only idiotic in the sense of tools not working with them properly. spaces are allowed in paths and filenames in most filesystems, and so tools written to handle paths and filenames should handle spaces. spaces carry no special path information, so it’s a little weird they are ignored by many tools. it would be crazy to think of tools not handling a “b” or something. and i agree with the tabs thing. although, it was pointed out to me that in a newish version of make, you can override this behavior with a flag. i doubt it works well though because of makefile compatibility issues.
- berti 8y ago> it’s only idiotic in the sense of tools not working with them properly. It's idiotic because it's annoying for things like tab completion (technically another tooling issue I suppose... but why bother going against the grain for little/no benefit).
- jcelerier 8y agoThe only reason it's idiotic is because shells accept unquoted strings
- minitech 8y ago> Putting spaces in pathnames is idiotic to begin with. The thing that’s idiotic is not being able to handle valid paths. Yes, all of them. Yes, including ones containing GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL (but also apostrophes, backslashes, quotes, dollar signs). It boggles the mind that a tool that does everything through a shell can’t be made to pass arbitrary information to that shell in a reliable manner.
- spc476 8y agoGNUMake handles UTF-8 just fine. I was able to replace spaces (character 0x20) with non-breaking spaces (character 0xA0) and it just worked (https://news.ycombinator.com/item?id=16527084 https://news.ycombinator.com/item?id=16527084).
- minitech 8y agoSorry, didn’t mean to imply it couldn’t; just pointing out that it’s important to handle despite the way the parent suggests it’s a ridiculous expectation.