3 ms·
> Probably typesafe configuration DSLs are going to be a thing in the future. Neither JSON nor Yaml really do this. And schemas just add a lot of cruft. You ki
by oblio 8y ago
> Probably typesafe configuration DSLs are going to be a thing in the future. Neither JSON nor Yaml really do this. And schemas just add a lot of cruft.
You kind of need schemas. Or you need better type systems. I want at least regexp validation, interval validation, etc. from my configuration files.
- jillesvangurp 8y agoThat's the point of typescript. It has a type system. And regular expressions are supported in javascript/typescript as well. Interval validation might be a bit harder. In any case, you don't get any of that with most json/yaml based configuration languages. I seem to rarely encounter anything that comes with a schema.
- oblio 8y agoI know that Typescript has a type system :) My point was that the current config file formats are not good enough - I agree with that - but if we want to switch away from them, we need even better formats. They need to be at least good as the previous generation (XML), which had schemas. JSON and YAML are a regression which became popular because of their simplicity. We need the simplest config format that comes with a schema. They should either come with a separate schema system or with a type system that is powerful enough to implement what I said before: regexp validation, interval validation. Without making you write more than validate="[a-z]*", not writing a whole class or such.