4 ms·
> Compile app_config.py into app_config.js so our application configuration is also available in JavaScript Terrifying! Why do you need to specify your configu
by tantalor 14y ago
> Compile app_config.py into app_config.js so our application configuration is also available in JavaScript
Terrifying! Why do you need to specify your configuration in code? I would think configuration as data is simpler.
- 0x0 14y agoWhy not? With config as data, you need an extra parsing step. More moving parts, more maintenance, and the same end result.
- andrewmunsell 14y agoTo be fair, that parsing step is still here-- it's just being parsed into Javascript.
- pyre 14y agoIf the configuration was data, then you would have to parsing steps: Data => Python Data => JavaScript With this setup they only have one: Python => JavaScript Granted, storing it in YAML/JSON/whatever means that you could potentially have many different codebases / languages reading it without a Language A => Language B conversion. It just depends on what works best for your project / team.
- gnaritas 14y ago> Why do you need to specify your configuration in code? I would think configuration as data is simpler. Code is data.
- wahnfrieden 14y agoThat's mostly irrelevant. Code is often non-deterministic in its output, so its merit as a medium for configuration is highly dependent on context.
- gnaritas 14y agoSure, but the context is often quite suitable for using code as configuration; quite often.
- wonnage 14y agoSome would say the distinction doesn't really exist.