Supporting command line arguments in Dart programs
Dart programs, really all programs, are either hardcoded against certain targets and configurations or they configurable at startup. Not sure about you but the word "hardcoded" always sounds bad. The most common way of providing configuration information is probably: Command-line arguments Environmental variables Properties files or other accessible storage Properties services The approach you pick depends on the nature ephemeral nature of the program, the environment you run in, and if the configuration can change while the program is running . Sometimes you use a combination, one configuration method at bootstrap, and then a different one as the program continues running. In all command-style programs, I've found that I need some way to bootstrap the process. It almost always has command-line arguments or environmental variables. Environment variables are great but can be a bit opaque depending on how the program is run. My go-to is to include run-time argument suppo...