On Tuesday, 25 February 2014 at 13:26:20 UTC, Dejan Lekic wrote:
I don't like it. I would prefer a CTFE-able counter part to
boost::program_options that generates thouse enums from a
config file.
If you want a config file, you do not need -D args. You simply
import() it. Right?
Yep, that would be a cleaner solution since it would avoid some
pitfalls with the current flags proposal: Should those enums be
fully qualified? What if I put all the source files into a single
command line (which leads to faster compilation with dmd)? May
that override enums by accident? Should every enum be
overwriteable or only those that have a specific UDA etc. etc. ?
And in the end you are using a build tool anyway and you'll put
your config flags into a makefile or something that then becomes
an ugly config file.