Python is going to be hard

Chris Angelico rosuav at gmail.com
Thu Sep 4 23:08:49 EDT 2014


On Fri, Sep 5, 2014 at 12:56 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> On Friday, September 5, 2014 8:01:00 AM UTC+5:30, Chris Angelico wrote:
>
>> That's one particular example that's from Unix. I've seen (and
>> written) Windows GUI programs that use consoles, too. And OS/2 ones.
>> Can't speak for Mac OS Classic as I've never used it, but I'd be
>> surprised if it's not possible.
>
>> So I still stand by my statement that console output is a fundamental,
>> and it's not a bad thing to teach it.
>
> If what is fundamental is what should be taught (first) then we should
> start with machine language because everything bottoms out into
> that. Yes?

No, that's not what fundamental means. And if you try to say "teach
the lowest abstraction first", then you have to teach electrical
engineering... oh wait, that's just an abstraction over physics...
which is an abstraction over mathematics... which gets us right back
to the top of the stack.

The fundamental is the thing that's most basic in *usage*, not
implementation. Console output on a modern GUI system ends up becoming
GUI display, so if you go by the "most concrete wins" then you should
start by teaching a GUI. But the console has been implemented for you,
and in usage, it's the simplest and most basic form of output
available. It's also the most cross-platform - there's no form of
output more available than stdout.

> Likewise here. In C we have no choice but to produce standalone
> executables.

Technically wrong, I've seen interactive C interpreters :) Language
doesn't mandate usage structure.

> Imposing the same impoverishment onto a beginner by
> teaching script-writing before the REPL is a miserable choice.

Personally, I'd teach both very early. Whether you teach scripts first
or REPL first doesn't make much difference - just teach both. I'm not
sure what this has to do with print, though, nor how you propose to
make useful programs without side effects.

ChrisA



More information about the Python-list mailing list