AirPete said:
While I agree that teaching OOP first isn't a good idea, C# can be very
"un-OOP" when writing console applications (you don't want to start teaching
Windows programing until later, anyway).
IMO, C# is an ideal first language.
- pete
[snip]
There in nothing inherently OO about GUI applications,
just like there is nothing un-OO about console applications.
You could actually argue that it easier to learn about OO
in a console application as you are not constantly distracted
from the problem(s) at hand by having
to present to/interact with the user.
The issue here is that learning to program can be hard enough
without having to wrap your head around classes, instances,
interfaces, etc.
C++ is a multi-paradigm language but I don't see any danger
of anyone suggesting that as a first language. By the same token
C# potential "un-OOP"-ness should hardly qualify it as an
ideal first language.
The main issue is that it is difficult to write anything in Java/C#
without OO that doesn't result in "bad" Java/C# code
(eg. every program is a single God Class) or worse, uses
object oriented features in an undesirable way.
Learning to program in an OO-language and ignoring OO develops a
lot of bad habits that have to be un-learned when OO enters the
picture (especially if you are still using only that language)
- or worse leads to the attitude that OO is a waste of time
because it wasn't needed in the past.
There are already enough Java programmers around that know little
of OO and I'm sure the numbers of their C# equivalents are rapidly
growing too.
I haven't seen Petzold's "Programming in the Key of C#" -
maybe he's found a way around it.
Originally BASIC was developed as an entry level language:
<quote>
BASIC (standing for Beginner's All Purpose Symbolic Instruction Code)
is a system developed at Dartmouth College in 1964 under the directory
of J. Kemeny and T. Kurtz. It was implemented for the G.E.225. It was
meant to be a very simple language to learn and also one that would
be easy to translate. Furthermore, the designers wished it to be a
stepping-stone for students to learn on of the more powerful languages
such as FORTRAN or ALGOL.
From "Programming languages: History and fundamentals" by Jean E. Sammet.
</quote>
Should that have qualified it to become a mainstream programming
language? - that is another story...
For all I know MIT chose a functional language because it enabled
them to start with a small subset of the language to do something
productive, while it minimized the un-learning/re-learning required
as more features are introduced to the student.
Anyway OO isn't the solution to every problem - sometimes
procedural or functional approaches are more appropriate - so
one should be familiar with all of them; and when you are learning,
why not start with the simplest (just don't stop there).