4 ms·
You would have loved s-expressions in a typical lisp setup, then. :) And you have also obviously never fallen victim to slightly off spec JSON parsers and folk
by taeric 8y ago
You would have loved s-expressions in a typical lisp setup, then. :)
And you have also obviously never fallen victim to slightly off spec JSON parsers and folks that took advantage of them. Trailing commas? Definitely useful. Until they break a system. (Oddly, I have been stricken lately by how much people hate the extra parens of lisp, but nobody bats an eye at the pointless commas of every other language...)
- TuringTest 8y agoThat may be because you don't need to keep track of how many commas are there, you can just throw them in wherever you need one. Yet parentheses must always come in pairs, you need a pair for every term in the program (brackets are only needed for full statements), and they tend to pile down at the end of complex functions and data structures.
- taeric 8y agoI have seen more than my fair share of build failures from missing or extra commas. Worse, they have odd behavior in some languages. That said, I cede that they are different. I just don't get the hate of parens.
- sli 8y agoMy frontend builds fail because of trailing commas in the code (by design, so technically a non-issue). At the same time, my editors can balance parens but they can't really do anything but complain about trailing commas. It can't assume it's an issue and "fix" it because I just might not be done writing, yet. My editor can make more and safer assumptions about paren balancing, however, and so it does. I really have no horse in this race, neither of these things bother me. I just can't help but notice that the paren problem in particular can be easily rectified.
- TuringTest 8y agoYeah, I concur. I mean, instances have a "global stream" where all posts from all users are sent? What's the use for that? It would be like Facebook or Twitter having a "front page" showing all posts from all their users. I don't want to read what something posted merely because they're subscribed to the same physical server. There should be some classification of affinity by common interests.
- jcelerier 8y ago> (Oddly, I have been stricken lately by how much people hate the extra parens of lisp, but nobody bats an eye at the pointless commas of every other language...) I just checked an a comma is a grand total of three filled pixels on my coding font in my screen while a parenthese is 12 pixels. Parentheses are freakin visual bloat. Just look at this : https://i.imgur.com/UTGjbI5.png https://i.imgur.com/UTGjbI5.png
- chriswarbo 8y agoI think that's a poor reason to choose a concrete syntax, and if it really bothers you it's easy enough to have your machine display them however you want. For example, I use https://www.emacswiki.org/emacs/DimParentheses https://www.emacswiki.org/emacs/DimParentheses to make parentheses unobtrusive. I sometimes want to see them if they're at my cursor position, so I use https://www.emacswiki.org/emacs/ShowParenMode https://www.emacswiki.org/emacs/ShowParenMode to highlight that one and its corresponding opener/closer. I use https://www.emacswiki.org/emacs/ParEdit https://www.emacswiki.org/emacs/ParEdit to automatically keep parens/quotes/etc. balanced, move around whole subexpressions, etc. I'm sure there are similar tools for different editors (e.g. there's an incomplete list at https://github.com/shaunlebron/history-of-lisp-parens/blob/master/editors.md https://github.com/shaunlebron/history-of-lisp-parens/blob/m... ) There's a screenshot of this setup at http://chriswarbo.net/blog/2017-08-29-s_expressions.html http://chriswarbo.net/blog/2017-08-29-s_expressions.html
- kazinator 8y ago> Parentheses are freakin visual bloat. Just look at this: https://i.imgur.com/UTGjbI5.png https://i.imgur.com/UTGjbI5.png Not to mention that f and 0. We should write in Braille; f is just three dots and so is 0. Bonus: they are similar. Note that parentheses do something, whereas commas are purely gratuitous. You can't just remove the inner parentheses in (1 2 (3 4) 5) without replacing them with something else. (1, 2, (3, 4), 5) is just stupid though.