4 ms·
I'm puzzled what you mean by this. Do you mean it's not easily editable by non-engineers?
by tomtheelder 5y ago
I'm puzzled what you mean by this. Do you mean it's not easily editable by non-engineers?
- enriquto 5y agoIt's annoying to edit by everybody. I guess engineers will especially abhor the unnecessary complexity. This is the proposal of TFA: export const config: MyAppConfig = { locale: 'en-US', timezone: 'America/New_York', logLevel: 'info', environment: 'local', } And this is how simple it could be: LOCALE en-US TIMEZONE America/New_York LOGLEVEL info ENVIRONMENT local The first version has 19 useless punctuation symbols and a few spurious words that are not related to the configuration itself, but are constraints of the typescript implementation. The second version is much simpler, easier to write and to parse using trivial string processing, without depending on any third-party library. It is beyond me how could any serious engineer honestly find any advantage in the first version.
- aldonius 5y agoWell, if you want nesting on your map then you need something slightly more complicated than your second version, but I will grant that you could do something like: A.B value C value D.E.F value D.E.G value