tag:blogger.com,1999:blog-2080885971644496896.post6798041830905815449..comments2016-12-01T06:12:54.417-05:00Comments on The Racket Blog: I Write Funny-Lookin' Racket Code: An Alternate Style for Delimiters and IndentationJens Axel Søgaardhttp://www.blogger.com/profile/15211030864341077735noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-2080885971644496896.post-85213389380218751802012-09-28T19:21:30.440-04:002012-09-28T19:21:30.440-04:00re:Eli --
Yep, this style definitely isn&#39;t fo...re:Eli --<br /><br />Yep, this style definitely isn&#39;t for everyone, and it&#39;s definitely got some huge tradeoffs. I am acutely aware that I sometimes sacrifice the ability to easily tell how many arguments something has, and that&#39;s one place I&#39;m not sure I made the right decision. I am careful to only put multiple things on the same line if they&#39;re right after the function name, or in the case of functions like error or printf where I&#39;m just filling in values for the &quot;~a&quot; or &quot;~s&quot; escapes. Otherwise, after the first line, I definitely want a clear visual marker of how many arguments there are.<br /><br />As for the curly braces, I like that I have to put some thought into the indentation myself. The braces give more than just whitespace to say what&#39;s &quot;special&quot;. Frankly I&#39;m annoyed at how much extra duty () does, and I prefer making an explicit distinction.<br /><br />But I&#39;m definitely not trying to sway anyone here away from traditional Racket style, just presenting my own odd habits.Carl Eastlundhttp://www.blogger.com/profile/00965085482378134816noreply@blogger.comtag:blogger.com,1999:blog-2080885971644496896.post-40271497305870436592012-09-28T17:31:41.581-04:002012-09-28T17:31:41.581-04:00There is a good reason for the arguments of a func...There is a good reason for the arguments of a function to be lined up: it makes the sexpr tree easily visible, no thoughts on how things match up needed. And indeed, as someone who is used to having this very visible structure, I find the two-space indentation for all arguments except for the first that is left on the first line much harder to read. Combined with multiple expressions on the first line I can see how this can get to be even worse (though not with simple &quot;+&quot; and &quot;0&quot;). (Obviously, you&#39;ll disagree as someone who is used to not getting these visual cues, which is why these are fertile flamewar materials.)<br /><br />In addition, IIUC, the curly brace thing is a way that forces you to specify stuff on each and every form, instead of making your editor know about these forms -- and in that case it looks like a bad deal for me, sacrificing visual readability, and overall requiring me to do more work than adding one more name into my editor configuration.<br />Eli Barzilayhttp://www.blogger.com/profile/04250857957616050612noreply@blogger.comtag:blogger.com,1999:blog-2080885971644496896.post-84447122095298931942012-09-28T17:21:16.430-04:002012-09-28T17:21:16.430-04:00Beautiful!Beautiful!Robby Findlerhttp://www.blogger.com/profile/08402308775580442837noreply@blogger.com