[dmd-beta] D 2.062 beta

Leandro Lucarella luca at llucax.com.ar
Wed Feb 13 03:06:10 PST 2013


Walter Bright, el 12 de February a las 12:45 me escribiste:
> 
> On 2/12/2013 12:27 AM, Rainer Schuetze wrote:
> >
> >Format of the ini file is an unrelated issue. I guess Windows
> >users are more familiar with ini files than with JSON, which adds
> >syntactical noise for features that are currently unused. Being
> >standardized it's also more problematic to modify the format with
> >functionality like the proposed "?=" to set a value only if it
> >isn't set in the environment yet (though other syntax might be
> >invented like prepending a "%@no_overwrite%" to the value).
> 
> I don't think it is problematic, it's just a different way of
> thinking. The current .ini files override environment variables. You
> proposed a method of providing a 'default' setting. In json,
> 
> {
>     "Environment": { "override" : { "name" : "value",
>                                                           "baz" : "foo" },
>                                   "default" : { "foo" : "bar" }
>                                 }
> }
> 
> or something similar. For backwards compatibility, the old .ini
> format can still be recognized. The nice thing about json is we can
> add features without changing the file format.

Please, don't use json for configuration files, is a format intended for
machines, not humans (OK, is better than XML but still horrible for
humans).

If you need a standard and flexible file format that is almost as good
for humans and machines, maybe you want to consider YAML.

Environment:
  override:
    name: value
    baz: foo
  default:
    foo: bar

But I still think a configuration file shouldn't be as complex as YAML.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Debemos creer en los sueños del niño. Cuando el niño sueña con tetas, se
toca.
	-- Ricardo Vaporeso. Toulouse, 1915.


More information about the dmd-beta mailing list