3 ms·
It's one of 12 "Why not use...?" subsections of that document but there's no subsection on "Why not use s-expressions?" Perhaps that was because they didn't co
by nemoniac 3y ago
It's one of 12 "Why not use...?" subsections of that document but there's no subsection on "Why not use s-expressions?"
Perhaps that was because they didn't consider them or maybe they did consider them but could not think of any reasons not to use them?
- drewcoo 3y ago> there's no subsection on "Why not use s-expressions?" It's all about config files. Are there people using s-exps in config files?
- kstrauser 3y agoI use Emacs, so yeah. I’d rather write some TOML/YAML/JSON for simple things where there are a handful of key/value pairs. In more complex cases where you want specific typing, or inheritance, or to solve any of the problems in this article, oh how I wish I could use something like a Guile parser to evaluate s-exprs. It would make life so much simpler.
- nemoniac 3y agoEmacs and Guix are standout examples. You could also include anything built on Clojure EDN. And, in the same way as Elisp for Emacs, Guile is an s-expression based language used not only for configuration but also for extension of GnuCash, GIMP, LilyPond and Pidgin.
- lapsed_lisper 3y agoS-expressions only really address a smallish part of what people seem to want out of configuration file syntaxes: a simple, recursive syntax. Among the things that S-expressions don't address per se are the interpretation of tokens (e.g., numeric vs non-numeric token syntax), how non-numeric tokens may be interpreted as booleans, symbols, timestamps, etc.; whether to use alists vs. plists for associations and the semantics of any duplicate keys within an associative construct; how to specify the schema for a configuration object (required vs. optional elements & the types of each, etc.) IOW, merely saying "use S-expressions" over-emphasizes syntax while under-emphasizing semantics.