[Edu-sig] Python for CS101

Kirby Urner urnerk at qwest.net
Fri May 6 01:09:47 CEST 2005


> Let's hypothecate that C# might look a lot more like Python had it not had
> that particular design requirement.
> 

It's somewhat inherent that compiled languages have this "no source code
needed" option.  Python is the same way on Windows; this giant DLL in
c:\windows\system, compiled from C.  You can also get binary-only RPMs for
the various Linux distros.

It's not the language C/C++ itself that determines if source is available or
not.  Nor C# by the same token.  

Labeling attributes 'private' or 'protected' aren't intrinsically about
creating closed source software.  They're about the coder implementing a
consistent strategy, e.g. of not leaving certain variables directly exposed,
in case the setter/getter methods need to be changed later.  The compiler
looks over your shoulder and makes sure you don't break your own rules.

Even if all source is forever open, you still want to keep private variables
private -- to fence off what's not part of a class API.  Python accomplishes
the same distinctions with under-bar syntax.

Any CS curriculum should include one or more compiled system languages, with
type declarations and compile-time checking.  

The drift right now is towards NOT using such languages for intro courses,
because this turns off too many people (especially non-CS majors, but also
those still trying to make up their minds) and frontloads the course with a
lot of unneeded overhead.  

If one buys that starting with a system language is not such a great idea,
then that leaves some of the so-called dynamic or agile languages to
consider, Python being one of the stronger of these.

Is Java a system language, or C#?  They blur the distinction a bit, in
running on VMs, like Python.  The .NET VM has the advantage over Java of
supporting numerous languages, boosting interoperability.  The new Perl VM
has a similar goal (of supporting multiple languages, including Python).

Basically, VM architecture is the new way to design languages (since around
the late 1980s or so?).  Everybody gets to use the same language, with the
interface to the underlying OS taken care of invisibly, by the VM itself.
Python, Java, C# and Perl all work this way, plus any other .NET language
(of which there are currently about seven I think).  

CS courses need to discuss this new architecture.  It's not quite the same
approach taken by C (which had early claims to "portability") which both
externalized libraries and made the compiler platform-specific.  C doesn't
have this concept of a VM that you're running "on top of" or rather, the OS
itself is that VM.

> Does that leave us - in your opinion - anywhere in particular.
> 
> To me - as to which is more suitable for academic purposes - it does. And
> I guess I then generalize a bit from there.
> 
> Art

My original point is I won't be surprised to find a .NET centric approach
that includes Python, in some future CS curriculum.  I don't expect this to
be the only approach, nor necessarily the "best."  And I think a lot depends
on .NET succeeding an OS-neutral technology.  

If .NET succeeds in this way, then I think the results will be interesting
enough to merit a lot of surrounding curriculum, and I am not predisposed to
militate against it, as somehow subversive of my core values.  

At this point, I'm not seeing what core principles that I hold would be
violated.  That could change, but this is where I'm at today.

Kirby




More information about the Edu-sig mailing list