Python and Flaming Thunder

Dan Upton upton at virginia.edu
Wed May 21 12:00:44 EDT 2008


On Wed, May 21, 2008 at 11:34 AM, Dave Parker
<daveparker at flamingthunder.com> wrote:
> For example, consider the two statements:
>
>     x = 8
>     x = 10
>
> The reaction from most math teachers (and kids) was "one of those is
> wrong because x can't equal 2 different things at the same time".

Sounds to me like the teacher is being difficult, and IIRC,  you've
talked about having elementary school kids write in FT -- I don't
think asking "does this make sense to you" of elementary school kids
is necessarily the best metric for PL syntax/semantics.

> Many computer languages conflate "equality" with "assignment" and then
> go to even more confusing measures to disambiguate them (such as using
> == for equality, or := for assignment).
>
> Plus, symbols are more confusing for people to learn about than
> words.  There are lots of people who are fluent in English, but
> dislike math.

If you can't do, or don't like, math, you probably shouldn't be
programming.  If you don't have any symbolic reasoning skills, you're
largely limited to "Hello, World."

> That way, = can be reserved unambiguously and unconfusingly for the
> mathematical notion of "equality" -- because it's in their math
> classes that people learn what = means:
>
> Set QuadraticEquation to a*x^2 + b*x + c = 0.

You keep trotting out this quadratic equation example, but does FT
actually have any kind of useful equation solver in it?  Or does it
just allow you to do something like

Set QuadraticEquation to a*x^2 + b*x + c = 0.
Set a to 1.
Set b to 0.
Set c to -25.
Set x to 5.
If QuadraticEquation is True then do ....



More information about the Python-list mailing list