Should I avoid using spaces in my filenames?

I sometimes find experienced programmers who will actively avoid using spaces in their filenames, opting to use underscores or camelCase instead. (i.e. /org map/attach jobs.cpp vs /org_map/attach_jobs.cpp vs /orgMap/attachJobs.cpp) From what I understand, this was originally done on older systems which had more strict restrictions on filenames. But modern computers don't seem to have any issues with spaces. Why do some developers avoid using spaces in filenames? Is this a design practice I should consider for my own projects?

Feb 19, 2025 - 21:10
 0
Should I avoid using spaces in my filenames?

I sometimes find experienced programmers who will actively avoid using spaces in their filenames, opting to use underscores or camelCase instead.

(i.e. /org map/attach jobs.cpp vs /org_map/attach_jobs.cpp vs /orgMap/attachJobs.cpp)

From what I understand, this was originally done on older systems which had more strict restrictions on filenames. But modern computers don't seem to have any issues with spaces.

Why do some developers avoid using spaces in filenames? Is this a design practice I should consider for my own projects?