On Mon, Feb 09, 2009 at 11:02:37AM -0500, tedd wrote: > Hi gang: > > At the college where I teach, they are considering teaching OOP, but > they don't want to settle on a specific language. > > My thoughts are it's difficult to teach OOP without a language -- > while the general concepts of OOP are interesting, people need to see > how concepts are applied to understand how they work -- thus I think > a specific language is required > > I lean toward C++ because I wrote in it for a few years AND C++ > appears to be the most common, widespread, and popular OOP language. > > However, while I don't know PHP OOP, I am open to considering it > because of the proliferation of web based applications. My personal > opinion is that's where all programming is headed anyway, but that's > just my opinion. > > With that said, what's the differences and advantages/disadvantages > between C++ and PHP OOP? I don't know Java, but I suspect it's a more purely OO language than C++. I *have* coded in C++, and the OO aspects of C++ are like a bolt-on on the C language. There are some odd aspects of C++ because of its history as originally a preprocessor hack on top of C. PHP is *not* a good example for OO. There are a lot of OO principles it doesn't follow. I would have suggested Smalltalk, the original OO language, except that no one uses it any more, and other languages don't necessarily fully implement OO as done in Smalltalk. You're right about using a language which implements OO in a realistic way for today's programmers. I also agree you need a language in which to teach OO. Otherwise, this is all just theory, and won't stick with the students. Imagine learning algebra but never solving equations in the class. You'd forget the whole thing ten minutes after the class was over. In fact, it seems a little backward to teach OO programming as a lone subject. I would instead opt for teaching a language first, and OO as a secondary part of that course. Learning C++ will go a long way in assisting the student to learn Java, or vice versa. My experience programming C has been invaluable in coding under PHP. As a side note, I think students should learn a language like C before learning something like Perl, Python or PHP. Having to deal with defining/declaring variables and their storage methods before use I think makes for more conscientious programmers. And pointers are an education all on their own. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php