Application settings

Cym13 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 7 12:44:27 PDT 2017


On Friday, 7 July 2017 at 19:40:35 UTC, FoxyBrown wrote:
> What's the "best" way to do this? I want something I can simply 
> load at startup in a convenient and easy way then save when 
> necessary(possibly be efficient at it, but probably doesn't 
> matter).
>
> Simply json an array and save and load it, or is there a better 
> way?
>
> Ideally, I'd like to store the settings as part of the binary 
> to keep everything together but that poses a few issues I think.

I think you're better off with a simple file in a format like 
JSON or INI yeah. Simpler is better.

I don't see any easy way to save the configuration in the binary 
and would find it more troublesome than anything as an user as 
having the configuration appart means I can easily compare it 
between computers and track its changes etc.

I don't think you need to worry about performances, after all 
it's only loaded once and the config would have to be *really* 
big for it to have a noticable loading time.


More information about the Digitalmars-d-learn mailing list