4 ms·
I see a surprising lack of parenthesis for something related to Guix. What's the story behind it?
by TeMPOraL 7y ago
I see a surprising lack of parenthesis for something related to Guix. What's the story behind it?
- jboynyc 7y agoThere are talks by the creators presented at FOSDEM that go into the development of the workflow language. https://archive.fosdem.org/2017/schedule/event/guixworkflowmanagement/ https://archive.fosdem.org/2017/schedule/event/guixworkflowm... https://fosdem.org/2019/schedule/event/guixinfra/ https://fosdem.org/2019/schedule/event/guixinfra/
- chriswarbo 7y agoLisp doesn't need to use s-expressions (i.e. parentheses), that just-so-happens to be the most popular serialisation format. These examples look more like I-expressions to me ( https://srfi.schemers.org/srfi-49/srfi-49.html https://srfi.schemers.org/srfi-49/srfi-49.html ); i-expressions and s-expressions are equivalent and can be converted back and forth trivially. Lisps can also support arbitrary input formats using reader macros, so it might be using that (I haven't looked at the implementation yet).
- blunte 7y agoBut with sexps, if your code suffers some formatting catastrophe (such as all instances of whitespace being reduced to a single space), the sexp code is trivially recoverable/reformattable. Depending on whitespace and indentation creates such fragile code that I can't understand why the trade-off would be made.
- nerdponx 7y agoFormatting catastrophes are exceedingly rare. You have your code in version control anyway, right?
- chriswarbo 7y agoIf that's a concern then serialise using s-expressions. You can still edit using i-expressions or something equivalent if you like (it's trivial to convert, after all). Code on-disk doesn't need to be the same as code in-editor (for example, syntax highlighting isn't saved to disk either)
- shakna 7y agoIt's based around WISP [0], an SRFI that grew out of a couple previous attempts to build alternative syntax. [0] https://srfi.schemers.org/srfi-119/srfi-119.html https://srfi.schemers.org/srfi-119/srfi-119.html