From: "John" <[EMAIL PROTECTED]> > Don't get me wrong, I think Perl is great and has it's place, and I > know I'm no authority, but I don't consider Perl a good language for > new CIS/CS students for a number of reasons including:
I agree with the conclusion, but not with all the reasons. (actually ... shouldn't university students already HAVE some background? I started programming BASIC when I was ... 12?) > It's technically a scripting language, not a programming language. Well ... I kind of disagree. Perl used to be a mere scripting language, but IMHO it already matured into a fullblown general programming language several years ago. > It's "object-oriented" system is an afterthought. What's the object oriented "system" in C++? > Variables are loosely typed. Yes. This is a bit of a problem. Especialy since unless you use strict you are not forced to declare your variables. > It allows constructs such as routines returning > multiple values which are unthinkable in good programming practice. Whadafuck? While I could agree with a part of the sentence you took a wrong example. Do you really think to be forced to jump through the hoops whenever you need to return two numbers as you have to do in C is good? Do you think it's fine if you have to use either OUTPUT parameters (a completely senseless invention) or return an array that the programmer has to "decompose" later? Sorry but ( min, max ) = Limits( list ); is always better than either Limits( list, *min, *max ); or int ret[2]; ret = Limist ( list ); min = ret[0]; max = ret[1]; The fact that most of the currently widely used languages do not support it is irrelevant. If everybody will be taught to bend over twice whenever he needs something we'll never get anywhere. > It's cryptic. Any language may be cryptic. It tends to look like line noise when you first see it due to all those $, @, % and &s, but later on they actualy help readability. And actually this could help students learn to write more readable code. The only thing the teachers would have to do is to ask them to do a homework, and then a month later ask them to change that homework slightly. The students would learn pretty quickly that it's good to care about HOW they write code. > It has too many special symbols. You don't have to use them if you don't like. Or you mean the $, @, % and &s? I love them. I love them in Perl and I love them in SQL (MS SQL). You KNOW if something's a variable or a function call. > It makes things that > should challenge a beginner too easy and allows things that should not > be allowed for beginners. Well ... yes, for the starters. You are right. > For these reasons it teaches programming practices that can at best be > hard to apply to other languages (I don't think anybody writes in just > one language) If you know C ... can you write good SQL? Prolog? ML? Perl? Each time you are about to use a language you have to learn it. You have to learn how to THINK in the language. But it definitely IS painfull to have to go 30 years back and start learning C after you've worked with Perl. (Or ML ... which was my problem.) > and at worse lead to poor code. At first. Force them to change their scripts a few times and they'll write the nicest code in any language. > If you want to learn good sequential programming practices, maybe > start with C. If you can master C you can apply it to many other > languages (by contrast, Perl-specific knowledge is hard to apply > elsewhere), elswehere = C(++), VB and partialy Java There are many NEWER languages! And actualy I think the "is cryptic" applies to C as well. And perhaps more. IMHO Pascal is a better choice for teaching. The students might not use it anymore then, but it'll restrict and lead them more. Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]