4 ms·
The funny thing is that a DSL looks aesthetically pleasing but is more often than not a nightmare to work with. Lisp itself is a DSL, it's completely unconstra
by ljm 8y ago
The funny thing is that a DSL looks aesthetically pleasing but is more often than not a nightmare to work with.
Lisp itself is a DSL, it's completely unconstrained by common syntactical conventions (whitespace, block scopes, etc.) and the worst anyone can take away from that setup is that it requires typing ')' too much. Yet there are so many tools invented entirely to manipulate Lisp code so you don't need to rewrite editor plugins and what-not to get fresh syntax highlighting and completion for your brand new language.
Because it's also a programming language, it already supports functions and other constructs for abstraction and code reuse, should you need them for larger scripts with lots of boilerplate.
But tend to reject it and the already done work because of the aesthetics, and then we're going into the GitHub repos for things like Helm, Kubernetes, Terraform, etc. because the custom YAML/JSON-esque templating setup misses vital features and we're having to re-learn the same stuff over and over again.
- vnorilo 8y agoOne thing that puzzles me is that many people who complain about parenthesis are perfectly willing to deal with strange and inconvenient delimiter characters, such as semicolons and commas.
- flukus 8y agoTypically commas and semicolons don't have to be matched with open-commas and open-semicolons and you won't see several of them together like ';;;;'. There is a lot less ambiguity over what is ending than something like this example (worst case) from TFA: > (lambda _ (for-each make-file-writable (find-files "." ".*"))))))) ',' and ';' are far more convenient too, the sit right next to m and l, parenthesis require finger stretching and the shift key.
- rekado 8y agoI'm using paredit, so I'm never typing out closing parentheses. I'm just slurping and barfing s-expressions all over the place. I don't see parentheses but syntax units that my editor ensures remain correct. (I can understand the frustration if I was forced not to use Emacs, which has s-expression navigation commands, and if the use of paredit were forbidden.)
- Fice 8y agoIt's the great advantage of Lisp syntax that it supports structural editing in a complete and unified way, and paredit enables the leap from editing code by manipulating plain lines of characters to directly editing code as hierarchical structure.
- thibran 8y ago> Typically commas and semicolons don't have to be matched with open-commas and open-semicolons This is a problem that is non-existent when you use common tooling to write Lisp, like ParEdit or Smartparens. Since nobody would write C++ in Microsoft Word, nobody writes a lot of Lisp code without auto-matching parentheses tools.
- scentoni 8y agoWhat C and its descendents have instead is numerous repetitions of '\s}\n' to end if-then-elseif-else switch-case for while until functions methods classes and good luck figuring out which matches which when there's more than a screen between the beginning and the end of a block