[Edu-sig] Re: Lisp vs Scheme vs Python

Patrick K. O'Brien pobrien@orbtech.com
Sun, 27 May 2001 18:42:43 -0500


Wow. We're even getting polysyllabic pissing matches on the Edu list. Way
cool. <big wink>

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

-----Original Message-----
From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On Behalf Of
Tim Peters
Sent: Sunday, May 27, 2001 2:44 PM
To: edu-sig@python.org
Subject: RE: [Edu-sig] Re: Lisp vs Scheme vs Python

[Matthias Felleisen]
> ...
> Recursion:
>  Read up on data types and how to specify them. Mathematically
>  speaking (and that's what you want to do), there are
>
>   basic sets
>   subsets
>   unions
>   products
>   inductive definitions
>   (co-inductive definitions).
>
>  That's it.

I'd add finite maps to the list, aka associative arrays ("dictionaries" in
Python).  Viewing a finite map as a subset of the product of the key and
value sets isn't particularly illuminating, and especially not in a
programming context.  You can object that it's not "primitive", but then
neither are products:  in set theory products are defined in terms of
ordered pairs, where ordered pairs are in turn defined in terms of unordered
sets, the ordered pair (a, b) being (by definition) the set {{a}, {a, b}}.
Since products are frequent in practice, that reduction is too tedious to
endure every time, so we agree to pretend products are primitive in order to
get on with life.  Finite maps are also useful enough to merit
(pseudo)primitive status.

<much more snipped>