On Tue, Jun 29, 2010 at 8:03 AM, Mike Meyer < [email protected]> wrote: > You might also note that lisp behaves the same way as python - at least > outside of macros. As noted in the last paragraph, the paper isn't about > lisp vs other languages, its about readability vs "power as terseness". > The examples just happened to pick on a feature heavily associated with lisp.
Agreed. I'm not defending Common LISP - I've never used it and don't plan to. But Clojure is also a LISP. Comparisons to Clojure are more relevant to me (and this mailing list). I was responding to your remark that LISP "is held up as an example of how badly wrong allowing anyone to create statements can go." I think the paper actually demonstrates that allowing that *in a mutable language* can go badly wrong. I think the paper implicitly (and perhaps unintentionally) makes an argument against hidden side effects in general. If you care about readability you should appreciate a language restricts mutability - call it 'the functional(ish) way'. Steve > "Steve Molitor" <[email protected]> wrote: > > >> The Python approach leads to more readable > >>code: http://www.mired.org/home/mwm/papers/readability.html > > > >The two cases he sites do not apply to Clojure: > > More accurately, the problem being analyzed (a variable changing to a bad > value) can't happen in clojure. It has to have been bound with a bad value. > > >The first case is a function that is allowed to change the value of a > >variable passed into it. Variables are immutable in Clojure so you can't > >write the dangerous 'inc' function he describes. You can't change the > value > >of a variable passed to a function in Python either, but you can pass a > >mutable object to a function and have the function modify the object, > which > >is close to the same thing. Clojure is much more readable than Python in > >this regard. > > You might also note that lisp behaves the same way as python - at least > outside of macros. As noted in the last paragraph, the paper isn't about > lisp vs other languages, its about readability vs "power as terseness". The > examples just happened to pick on a feature heavily associated with lisp. > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected]<clojure%[email protected]> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
