Comment by kazinator

4 years ago

Spaces in file names are a poor idea. File names are identifiers, not titles.

Let's test something: http://example.com/my silly webpage.html.

Hey look, HackerNews just broke a URL with spaces in it. And it's written in a Lisp dialect and all; it's not some Unix job cobbed together with shell, sed and awk. The language has a string data type, and strings are passed to functions without word-breaking interpolations taking place.

You know what else breaks on spaces? Basic everyday gui text manipulation.

Suppose that in a block of text we have the sentence:

> Please look for the Holiday Schedule 2021 file.

If you double click on any part of the name like Schedule, pretty much every text widget on the planet will just select only that word, and not the entire filename.

However, if you have:

> Please look for the holiday-schedule-2021 file.

There is at least a ghost of a chance that a semi-intelligent GUI can pick that out as a word.

There exist good reasons to keep identifiers as clump beyond just command line shells.

It's why we need encoding like %20 in URLs that never pass through a shell script.