Reading configuration files
When your software has too many options to simply pass them all through the command line, or when you want to ensure that your users don't have to manually provide them every time they start the application, loading those options from a configuration file is one of the most widespread solutions.
Configuration files should be easy to read and write for humans, as they will be working with them quite often, and one of the most common requirements is for them to allow comments, so that the user can place comments in the configuration to write down why some options were set or how some values were computed. This way, when the user comes back to the configuration file in six months, they will still know the reasons for those options.
For these reasons, usually relying on JSON or machine-machine formats to configure options doesn't work very well, so a configuration-specific format is best.
One of the longest-living configuration formats is the .ini
file, which allows...