Experiences/guidance on teaching Python as a first programming language

rusi rustompmody at gmail.com
Wed Dec 11 16:41:32 CET 2013

On Wednesday, December 11, 2013 8:54:30 PM UTC+5:30, Chris Angelico wrote:
> On Thu, Dec 12, 2013 at 1:44 AM, rusi wrote:
> > It is this need to balance that makes functional programming attractive:
> > - implemented like any other programming language
> > - but also mathematically rigorous

> Attractive *to the mathematician*. A more imperative style makes sense
> to someone who's grown up with... well, parents...

> clean_room()
> eat_dinner()

> One won't start till the other finishes.

Yes its always like that:
When you have to figure 2 (or 10) line programs its a no-brainer that
the imperative style just works.

When the ten becomes ten-thousand, written by a nut who's left you with
code whose semantics is dependent on weird dependencies and combinatorial
paths through the code you start wishing that

- your only dependencies were data dependencies
- "Explicit is better than implicit" dinned into the nut's head

which BTW are the basic tenets of FP.

We have functions in C, in Scheme and in Haskell. The difference is that

- in C its impractical and unrealistic to have all functions as
  (mathematical) functions of the arguments
- in Scheme its natural but not enforced
- in Haskell its enforced

The nice thing about python is that one can (kindof) teach it in the
Scheme-like way before showing the C-like side.

More information about the Python-list mailing list