I need help settling a discussion about comments in configuration files. This is about the question "what dictates which character/string is used for commenting in any given program?"
Theory A) states that this is at the discretion of the program's developer. While it is widespread practice in programs under Unix-like OSs that the # charcter be used for commenting in config files (examples: ssh config files, /etc/fstab etc etc.), anyone may just as well specify in a new application that in the config files used by that application, a //, ++ or any other string constitutes the beginning of a comment.
Theory B) states that the above-mentioned widespread practice of using # is actually mandatory in that config files are like Bash scripts, and hence the syntax valid in bash scripts dictates, in some way (maybe by a standard, or some OS-wide directives), that the same syntax be applied also to config files of any programs - and that is the reason why # is the comment character in most config files.
Theory C) states that some entirely different factors dictate which string is used for commenting in config files (please specify).
The following seems to point at theory A):
many different configuration-file formats exist, with each application or service potentially having a unique format.
, but it's not an explicit answer. Thanks for any hints, also sources will be much appreciated!
bash
compatible file, a .YAML file, something completely different that doesn't even allow comments...):
as a comment pair (colon, space) in shell scripts.