Date: Oct 17, 2012 5:38 PM
Author: kirby urner
Subject: Re: In favor of teaching "dot notation"

On Wed, Oct 17, 2012 at 1:34 PM, Paul Tanner <> wrote:

> You started generalizing beyond coffee with your "Functional or "to
> one" relationships are pretty well understood today, no need to imbue
> them with mystical powers of action, or connotations of "belonging to"
> or "contained within"" and such, and so the general definitions of
> functions are now in play.

You should think of objects as members of a set, or likewise members in
memory. Each member has its attributes.

For example, if you're "2", a member of the set Z (integers) then your
blueprint / template includes circuitry / a recipe for "adding".

You, "2" and another member of your set, say "5", both have the add method
such that:

2.add(5) and/or 5.add(2) make plenty of sense. The Z type of object knows
"adding", i.e. the behavior "to add" belongs to the integer type.

In reality, I'm writing in a generic dot notation that doesn't exist. 2
.__add__(5) is how you'd write in in Python, but really 2 + 5, with +
triggering __add__, is the expected syntax.

> And this includes not in terms just of what sets are and are not in
> play but of how formulas are related to the use of the term
> "function". Some uses of the term refer to the formulas that determine
> the set of outputs, and even refer to the output itself as in "y is a
> function of x" and so on.

Sets tend to be over-valued thanks to Russell-Whitehead. They allow only
unique items, no duplicates. That's a restriction we don't always need.

In any case, I recognize sets as a good place to start using dot notation,
with S.intersection(T) or S & T representing members in common, another set.

S.union(T) would be their combined elements with no duplicates. So again,
an object with a behavior (union, intersection) and taking an argument
(another set).

Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:09:56)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> setA = {"A", "B", "C"}
>>> setB = {"B", "C", "R", "Q"}
>>> setA.union(setB)

{'A', 'Q', 'C', 'B', 'R'}
>>> setA.intersection(setB)
{'C', 'B'}

More than your TI calculator will do, and for free. Free download.

Raspberry Pi is for like $35 and will do this, but you still need keyboard
and monitor.

Parents? Any input? You live in a democracy remember? (ironic joke).