tag:blogger.com,1999:blog-6454006.post3903536359521301258..comments2024-01-16T14:32:49.175+00:00Comments on Arcane Sentiment: Parentheses are more annoying in infixArcane Sentimenthttp://www.blogger.com/profile/04144052171693893368noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6454006.post-28857157728618202482015-01-18T18:12:41.488+00:002015-01-18T18:12:41.488+00:00I don't find the ((lambda ...) ...) parenthese...I don't find the ((lambda ...) ...) parentheses confusing, because they do essentially the same thing in a different namespace. (I might find ((setf foo) ...) confusing, but who writes that?) On the other hand, I do sometimes find the non-form parentheses in (let ((foo bar) ...) ...) confusing, especially when I'm reading from the inside out and haven't noticed the LET yet. I'm not sure whether writing them with different brackets is an improvement, since it makes paren-matching harder.<br /><br />I think most of the trouble in C-like languages comes from the grouping and function-call senses, which are common and intermixed. If so, redundant parentheses would be less confusing in languages without function-call parentheses, like Haskell. (Although Haskell has no other common parentheses either.)Arcane Sentimenthttps://www.blogger.com/profile/04144052171693893368noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-33717959674165422882015-01-12T14:57:11.574+00:002015-01-12T14:57:11.574+00:00> There's no easy way to indent infix expre...> There's no easy way to indent infix expressions, so breaking an expression across multiple lines doesn't alleviate much of the parsing load.<br /><br />Of course there is. It looks like a sideways tree -- which is precisely what makes the large prefix expression readable.peterfireflyhttps://www.blogger.com/profile/05050847835479172236noreply@blogger.comtag:blogger.com,1999:blog-6454006.post-45108760128849337872015-01-11T14:04:45.890+00:002015-01-11T14:04:45.890+00:00Some good insights here, thanks!
I would add as...Some good insights here, thanks! <br /><br />I would add as an aside, though, that even in Lisp parens do have multiple meanings. <br /><br />In some dialects of Lisp, for example, like Common Lisp, parens introducing the car of the form (as in an explicit lambda combination) are slightly different than evaluation parens, even if syntactically compatible. Scheme takes another position on this, but it's necessary for it to be a Lisp1 as a consequence of that. A Lisp2 necessarily does a different kind of evaluation here.<br /><br />Another example is the Muddle (MDL) programming language that Zork was written in long ago, which tried to tease out some of those meanings. There is a code snippet here that illustrates the difference, as some Lispy parens are replaced by angle brackets and others remain parens: http://en.wikipedia.org/wiki/MDL_%28programming_language%29<br /><br />So it might not be that Lisp is so uniform as that it's slightly different. Sometimes even the fear of difference (which I think is your point) is enough, though, and it almost doesn't matter if it is actually different. The fact of the difference is an easy justification of the fear, but fear can be justified even without proof. It's OK to fear crossing a busy street, and getting hit is certainly a proof that there was warranted fear, but we shouldn't be too quick to dismiss the fear in those who manage not to get fit. Their fear was still justified. A tricky business, fear.<br /><br />I also took on the parentheses issue in my Slashdot interview a dozen+ years ago. People wanting further thoughts on that might go there: http://developers.slashdot.org/story/01/11/03/1726251/kent-m-pitman-answers-on-lisp-and-much-moreKent Pitmanhttp://nhplace.com/kentnoreply@blogger.com