4 ms·
For good processing of the output it makes sense to add a flag like "--json", otherwise people have to come up with their own parsing that makes assumptions of
by Klasiaster 4y ago
For good processing of the output it makes sense to add a flag like "--json", otherwise people have to come up with their own parsing that makes assumptions of the output and breaks as soon as the output is changed slightly, e.g., by adding a new field.
- kkfx 4y agoI hope not. CLIs are meant for interactive usage, quick passages with simple key-value or crafted regexp are far better than ANY pre-made DSL, JSON is not for humans. CLIs are for human. The "integration" issue of CLIs is the classic Unix issue respect of Smalltalk systems, LispM etc: unix choose to be a container-ship for individual container instead of a unique ecosystems where programs are just functions/method of a common app. Such issue can't be solved hammering our genitals with JSON, YAML or something else, it's already well solved by OS designs like the aforementioned systems. A unique language, perhaps flexible enough to make new ones (like Racket, but any Lisp can essentially do the same easily) if needed, but still an OS-framework-operating-environment as a unique application where anything live inside. The reason we do not have that on scale is simply commercial: it's far more profitable the divide et impera vs crafting unique systems where being open is the most natural, sometimes mandatory, way to go...