This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
whyflagsarenolongerviable [2014/08/08 18:35] Mitch |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | From a programming perspective, | ||
| - | |||
| - | Directives are more suitable than flags for the simple reason that flags imply a limited pair of options: True or False (or Set / Reset, On/Off, Yes/No, etc.) | ||
| - | |||
| - | A simple example of the limitation of flags is that the proposed source file option didn't make sense: | ||
| - | |||
| - | < | ||
| - | ===== Source File Options ===== | ||
| - | Normally, you select the folder where one or more source files are to be processed. Sometimes, though, you may need to specify multiple files from all over the hard drive. If you don't want to have to keep browsing or dragging and dropping folders, one of these flags can help: | ||
| - | [[readsourcefromfile]] ignores the Main Window' | ||
| - | </ | ||
| - | |||
| - | The [[directivesreadfrom|< | ||
| - | |||
| - | Not only that, flags might interfere with each other. ParserMonster allows for the source files to come from drag and drop, the folder browse dialog box or a list file (from another program' | ||
| - | |||
| - | With directives, the framework will obey the last one detected. Simple. | ||
| - | |||
| - | Finally, directives are easier to code and maintain. Flags would have proliferated all over the framework as each module checked an increasing number of options. | ||
| - | |||