tag:blogger.com,1999:blog-5592542.post5044173918227246503..comments2024-03-18T17:28:44.693-07:00Comments on Rondam Ramblings: Z SHRTR BTTR?Ronhttp://www.blogger.com/profile/11752242624438232184noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-5592542.post-62736056266022958652008-02-08T19:05:00.000-08:002008-02-08T19:05:00.000-08:00> Really? Suppose I told you I had two versions of...> Really? Suppose I told you I had two versions of a program, functionally equivalent, where program A was half as long as program B. You wouldn't have any opinion at all about which you think might be better?<BR/><BR/>Absent any additional information, no, I wouldn't.<BR/><BR/>> Of course it could be possible that B is in fact better than A, but I'd bet otherwise.<BR/><BR/>You would lose that Ronhttps://www.blogger.com/profile/14719368822663798864noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-7881004907626043612008-02-08T18:25:00.000-08:002008-02-08T18:25:00.000-08:00> I sincerely do not believe that shorter is gener...> I sincerely do not believe that shorter is generally preferable.<BR/><BR/>Really? Suppose I told you I had two versions of a program, functionally equivalent, where program A was half as long as program B. You wouldn't have <I>any opinion at all</I> about which you think might be better?<BR/><BR/>Of course it could be possible that B is in fact better than A, but I'd bet otherwise. In general Unknownhttps://www.blogger.com/profile/05788005506078785626noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-64223135513541936422008-02-08T17:39:00.000-08:002008-02-08T17:39:00.000-08:00> Your post seems to imply that PG doesn't underst...> Your post seems to imply that PG doesn't understand that there's a tradeoff between brevity and readability... I highly doubt that.<BR/><BR/>Of course Paul understands this. But his rhetoric doesn't reflect that understanding.<BR/><BR/>> I don't think he'd go for the examples in your post, even though they do make things shorter.<BR/><BR/>Of course. That is the whole point.<BR/><BR/>> Again, Ronhttps://www.blogger.com/profile/14719368822663798864noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-56475004655371728982008-02-08T17:12:00.000-08:002008-02-08T17:12:00.000-08:00> Do you really believe that arguments should be n...> Do you really believe that arguments should be numbered instead of named?<BR/><BR/>Of course not. It's certainly true that there's a tradeoff to be made between brevity and readability, but I'd bet you can push pretty hard in the brevity direction before code becomes unreadable.<BR/><BR/>Your post seems to imply that PG doesn't understand that there's a tradeoff between brevity and readability.Unknownhttps://www.blogger.com/profile/05788005506078785626noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-63158122981765988092008-02-08T09:31:00.000-08:002008-02-08T09:31:00.000-08:00> In general, of course shorter is better. I have ...> In general, of course shorter is better. I have a hard time understanding why it's such a controversial idea.<BR/><BR/>Did you even read the actual post? Do you really believe that arguments should be numbered instead of named?<BR/><BR/>> I think maybe what you are looking for is Minimum Description Length<BR/><BR/>That may be what Paul is looking for, but it's certainly not what I'm looking Ronhttps://www.blogger.com/profile/14719368822663798864noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-25604840792130533212008-02-08T07:23:00.000-08:002008-02-08T07:23:00.000-08:00I think maybe what you are looking for is Minimum ...I think maybe what you are looking for is Minimum Description Length: a good language should minimise both the length of the language grammar AND the program text. MDL may be why people like Python and C for being small languages--they have a small grammar even though programs are sometimes longer.<BR/><BR/>In arc's case, the grammar is defined to be the arc source code. For what it's worth, PaulZackManhttps://www.blogger.com/profile/09413043374460704639noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-10477357130226466242008-02-07T22:03:00.000-08:002008-02-07T22:03:00.000-08:00"Z SHRTR BTTR?"In general, of course shorter is be..."Z SHRTR BTTR?"<BR/><BR/>In general, <I>of course</I> shorter is better. I have a hard time understanding why it's such a controversial idea.<BR/><BR/>Remember that the metric isn't number of characters (as the title of the post would imply) but number of nodes in the code tree. Though even acknowledging that, there's still something to be said for concise (in number of characters) names: I thinkUnknownhttps://www.blogger.com/profile/05788005506078785626noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-10005774598978611712008-02-07T12:16:00.000-08:002008-02-07T12:16:00.000-08:00> How do you account for the following case?Good q...> How do you account for the following case?<BR/><BR/>Good question, and too long to answer in a comment. I'll post an update shortly. In the meantime, to format code I use:<BR/><BR/><code><pre>...</pre></code><BR/><BR/>Except that blogger doesn't allow <code> or <pre> tags in comments. Bummer.<BR/><BR/>I guess the only thing I can suggest if you want to put code in a commentRonhttps://www.blogger.com/profile/14719368822663798864noreply@blogger.comtag:blogger.com,1999:blog-5592542.post-3105128593681803202008-02-07T12:04:00.000-08:002008-02-07T12:04:00.000-08:00How do you account for the following case? (let...How do you account for the following case?<BR/><BR/> (let i 0<BR/> (x y) (list 1 2)<BR/> (prn "i is " i)<BR/> (prn "x is " x)<BR/> (prn "y is " y))<BR/><BR/>Whether the 2nd set of binding forms are part of the body or not is ambiguous.<BR/><BR/>(Sorry, I don't know how to post code blocks properly)sjshttps://www.blogger.com/profile/14285255211269339227noreply@blogger.com