top | item 31178607

(no title)

th3typh00n | 3 years ago

Why would you have spaces in source code filenames? It's just a bad idea in general and makes things more complicated for no reason, regardless of what build system you're using.

discuss

order

stavros|3 years ago

Spaces in filenames aren't inherently bad, they become bad because tools that don't support them are bad. Saying "why would you have spaces?" as a counterargument to "make doesn't support spaces" doesn't work, because the problem with spaces is exactly that make doesn't support them.

trinovantes|3 years ago

Random trivia: Microsoft explicitly added the space in "Program Files" to ensure developers know they need to handle spaces in paths

samatman|3 years ago

I'm not entirely sure why "make, but it handles filenames properly and allows spaces for indentation as well as tab" isn't the most popular fork of make.

Does it even exist?

jcelerier|3 years ago

The spaces may be in parent folders, such as c:\Users\Jean-Michaƫl Celerier\Documents\Visual Studio Projects\Project 1\...

Which your uni's group policy would make it so that you can only write there (thankfully mine was sane, but I've seen it aha).

And even then, a build system that does not support arbitrary file names is just terminally broken and should not be used, even less encouraged.

mort96|3 years ago

That's "only" a problem for absolute paths, most projects which use makefiles use relative paths.

planede|3 years ago

Spaces are the lesser evil. Try newlines in file names. Also try having a directory that contains ":" in PATH.