4 ms·
You can compile your general purpose language DSL to json and then I think this isn’t too much of a problem. A bigger issue imo is packaging. General purpose l
by danenania 3y ago
You can compile your general purpose language DSL to json and then I think this isn’t too much of a problem.
A bigger issue imo is packaging. General purpose languages aren’t typed well-designed for producing single, understandable standalone files like config languages are. Like I think a simple config DSL in TypeScript could potentially be a perfect way to solve this problem, except that no one wants to lug around a package.json, package-lock.json, and node_modules directory just to write a bit of config. Yet the ability to bring in npm modules—especially those containing relevant types—is where a lot of the attraction of using TypeScript comes from.
- Jtsummers 3y agoSo turn the general purpose language into a non-general purpose language by creating a compiler for a subset of it. That might be what we'd call a configuration language then since it's no longer actually the original language (in full). Like JSON and others.
- danenania 3y agoIt’s not really a subset that I’m talking about—just a DSL that outputs JSON for easy portability. You could still use all the language’s features.