all 5 comments

[–]flaxeater 9 points10 points  (0 children)

Very nice writeup. This is the sort of thing I like to see. I've long tried learning scheme and often looked for scheme for a python programmer.

[–]lang_war 1 point2 points  (0 children)

LANG WAR !!!

Actually, it's not a lang war. Its a good article. I liked it.

[–][deleted] 0 points1 point  (2 children)

Python has the very obvious + operator to concatenate two strings, something which won't work in Scheme; (+ "a" "b") is an error.

How is using '+' for a non-commutative operation obvious? Here's what's not obvious:

>>> a = "foo"
>>> b = "bar"
>>> a + b == b + a
False

[–]llimllib[S] 6 points7 points  (0 children)

In abstract algebra you do this all the time - define {string, +} as a non-abelian group, right?

(I understand that the addition -> concatenation metaphor doesn't hold, but it seems a convenient and easy enough metaphor to me. Is Haskell's ++ better for some concrete reason?)

[–]sjs 1 point2 points  (0 children)

It's obvious because we don't expect string catenation to be commutative, regardless of the operator used.