[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [seul-edu] It looks like I'm going to learn Python



On Thu, 06 Apr 2000, you wrote:
> On Wed, 5 Apr 2000, Rakis wrote:
> And also I think that in teaching OO one must be very  careful.
> OO is not about using objects, its about object-design. In  C++
> OO design realisation is  very  restrictive  and  clumsy  (Sp?)
	
	Actually, the main problem with OO in C++ is that it's too flexible.
C/C++ was built upon the theory that "The programmer is always right" and
therefore has little in the way of protecting the programmer from himself. The
concepts of "friend" classes/functions and even multiple inheritance really
just add complexity where it isn't absolutely necessary.
	I most certainly agree with the part about C++ objects being clumsy, it
takes the average college CS major a couple months just to get up to a basic
operating level with OOP in C++. It's not the OO concepts, it's the fact that
the clunky C++ language gets in the way. Few colleges anymore start out with
C/C++ for even their CS students. University of Illniois starts their students
out with Scheme and Purdue begins with Java. 
	For anyone thinking of teaching a programming language in k-12 just go
ahead and forget about using C/C++ They're awesome languages and I definitely
wouldnt consider anyone a programmer without knowing them, however, for
starters, they're just too advanced.

> Under Python object-orientedness is natural and tidy.
> (I even dare recommend Python to teach OO instead of C++)

	Python certainly wouldn't be the worst choice, however, I saw a few
places that students could run into trouble with. The main point being that in
order to understand how to use OO concepts in Python, you really need to know
how the Python interpreter works. The theory is, of course, the same but in
order to figure out what you're doing wrong while coding, you almost have to
know how Python works at the underlying level. Along with this, Python does not
directly support Data Inheritance. Of all the OO langaues I'm aware of, only
PERL does this. Certainly the two most commonly used OO languages (C++ and
Java) do not work this way. I'd be hesitant to start with OO in python mainly
for those reasons.
	Personally, I've found Java to be the the best language for OO. It's
clean, simple, and strictly adheres to the OO philosophy. Begining with Python
for programming fundamentals like loops, functions, and basic I/O then moving
on to Java would seem to be the ideal solution at the moment.

> If  you   teach   OO,   don't   switch   to   it   just   after
> structural/modular programming: it's very different philosophy,
> requiring different thinking. (In fact, I am not ready to think
> OO way myself :-(

	Definitely, most of the C coders I know that have migrated to C++ are
still writing C programs..... they just use a few "toys" from C++ now and then.
Oh, they'll write the occasional class or two but the flow of their program is
structured, not OO. 

> 
> 
	Rakis