Herouth Maoz <[EMAIL PROTECTED]> writes: > I think it is extremely important to teach beginners to think > object-oriented,
Why? Why are you singling OOP out? I think that insistence on OOP is Java's biggest flaw. OOP is one of the many possible paradigms of programing, useful in, say, 1% of all real-life cases (before you flame, I said "useful," not "used" - it is too often used where is should not be). Java goes out of its way to force you into OOP whether it is useful or not. You can live happily with, say, C++ without ever doing OOP (many excellent programmers do, in fact). As a matter of fact, IIRC Stroustroup's book starts with an overview of different programming paradigms. I suspect that part is skipped over by most readers, because OOP is deemed to be "the right thing." All the good things that OOP supposedly brings to programming such as > what stuff should go together, in the same module, and prune some > nasty habits like globals. (and the list goes on, of course) have nothing to do with object-orientedness, and in fact predate the paradigm by a considerable margin. On the other hand, if you look carefully at well-written C code you will find out that many of the techniques naively associated with OOP are used in this small, simple, non-OO (gasp!) language. Look at the filesystems code in the Linux kernel for a good example. That's C, and it's quite OO when you think about it. My favourite example is Phil Graham's 6 line implementation of inheritance in non-OO Lisp - I think an example like that teaches you more about OOP than a year long course in Java. Java is too narrow-minded, and breaks too many things (basic types are second-class citizens, which is one of my favourite beefs) to be useful as a teaching language. Basically, it is quite awkward as a general purpose language. So what language should a future programmer use in his or her coursework? I'd say probably several. But more importantly, one should ask what the purpose is. For casual programming Java may be a contender, though if anything python looks more appropriate since it is interpreted (a great advantage for a student) and seems to fit a wider range of paradigms. I suspect when a student graduates from a CS department after a few years of pure Java coursework that's what you can reasonably expect him to do: Java programming. He will not be likely to handle, e.g., Java VM internals programming - *that* does not garbage-collect by magic... That guy, if he gets a job involving programming in C, will also be likely to screw up his mallocs and frees. And it is also possible that the fact that someone takes care of cleaning his dishes and getting rid of his garbage he will not be as refined as he could otherwise be about modularization and data abstraction. I strongly suspect that assembly is, in fact, essential for CS education. I am not a CS graduate, but I work in CS, and I feel that lack of assembly knowledge or experience is a big hole in my education. The level of C - probably the next highest - is absolutely essential, IMHO. One thing that it allows an instructor to do is demonstrate how (and how easy) it is to shoot oneself in the foot, and how to handle your firearms safely. Once that is understood, it is possible to go to higher levels and explain what it is that they (and their standard libraries) hide. Without that the strong points of languages like Java remain ivory tower theory. In other words, Java, python, etc, can wait till the student knows how to program. And for those who aspire to be really good, _some_ Lisp is a necessary, though not sufficient, condition. ;-) -- Oleg Goldshmidt | [EMAIL PROTECTED] ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
