Hi,
Is there any other reason for storing all h/hpp/cpp file names lowercase besides the fear of windows (and Macs with a case insensitive HFS) users forgetting to respect case sensitivity?
Hi,
Is there any other reason for storing all h/hpp/cpp file names lowercase besides the fear of windows (and Macs with a case insensitive HFS) users forgetting to respect case sensitivity?
Both lowercase only and mixed case are perfectly valid and workable choices. The standard library and boost stick to lowercase, whereas Qt uses mixed case. Of course, the standard library and boost also opt for lowercase identifiers. My personal preference is to keep to lowercase, probably largely due to historical baggage and my begrudging use of mixed case identifiers.
If you use mixed case for filenames, you may end up typing horrors like e.g.
becauseCode:grep foo *[Kk][Ee][Yy]*.[hH]*
won't do.Code:grep foo *key*.h*
I have found this particularly irksome with sources brought from Windows. I have also been bitten by projects written for Windows that then don't build on Linux because, however well-intentioned the original author, mistakes with the case of filenames don't get picked up until after you move the source from Windows. I find "lowercase only" easier to get right.
shopt -s nocaseglob FTW
if your question is answered, mark the thread as [SOLVED]. Thx.
To post code or command output, use [code] tags.
Check your bash script here // BashFAQ // BashPitfalls
and "grep -i"...
Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Bookmarks