Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!pravda.aa.msen.com!cssun.mathcs.emory.edu!emory!gatech!howland.reston.ans.net!agate!agate!matt From: matt@godzilla.EECS.Berkeley.EDU (Matt Austern) Newsgroups: misc.jobs.offered,comp.lang.c,comp.lang.c++,comp.object,comp.lang.eiffel,comp.lang.misc,comp.unix.bsd.386bsd.misc Subject: Re: Beginner to C/C++ looking for some good books Followup-To: comp.lang.misc Date: 01 Sep 1995 18:52:01 GMT Organization: University of California at Berkeley (computational neuroscience) Lines: 44 Message-ID: <MATT.95Sep1115201@godzilla.EECS.Berkeley.EDU> References: <40b4i2$egf@ixnews5.ix.netcom.com> <brockmanDDLJDL.2IJ@netcom.com> <41alha$b1g@cisunix1.dfci.harvard.edu> <brockmanDE5u28.5Lr@netcom.com> <19950831T090632Z@naggum.no> <427eaj$1ri@ucsbuxb.ucsb.edu> Reply-To: matt@physics.berkeley.edu NNTP-Posting-Host: godzilla.eecs.berkeley.edu In-reply-to: loren@beauty.ucsb.edu's message of 1 Sep 1995 17:02:11 GMT Xref: euryale.cc.adfa.oz.au misc.jobs.offered:205012 comp.lang.c:112123 comp.lang.c++:123025 comp.object:31435 comp.lang.eiffel:9164 comp.lang.misc:17256 comp.unix.bsd.386bsd.misc:165 [Please note the crossposting and the followup. I have redirected followups to comp.lang.misc.] In article <427eaj$1ri@ucsbuxb.ucsb.edu> loren@beauty.ucsb.edu (Loren Koss) writes: > Okay, here is where I am going to have to be almost rude and say "are you > a bonehead?" Perl is 0% portable. Why write a program that can only > work Unix machines? I've never heard of a Windows Perl interpretor. I have. At least I've used an MS-DOS Perl implementation, and I know of no reason it wouldn't run under Windows. Perl has also been ported to OS/2, and I strongly suspect that it either has been or will soon be ported to NT and VMS. > And > that brings up point number two. Why write a program in an interpreted > language? Interpreted languages are slow, make bad use of memory, and > often tie up useful resources while going through its lexical analyzer. Again: all other things being equal, an interpreted program will be slower than a compiled program. But all other things never are equal! If your program spends most of its time making calls to functions in a a regexp library then the interpreted versus compiled issue will be more or less irrelevant (Amdahl's Law, anyone?), and the main efficiency issue will be the quality of that library. In cases like that, Perl may well be an efficiency win. Note also that run-time speed doesn't always matter terribly much. I care about speed when I write (say) Monte Carlo programs, or large-scale neural simulators, but I also write lots of programs where I don't care about it. And, finally, note that there are many programming techniques that tend to be easier if you're using an interpreter than if you're using a compiler. > BASICALLY, C++ is language of choice. If you get confused programming in > it, drop down to C. And this is what I strongly disagree with. I don't believe in the concept of a "language of choice": I believe in using the right tool for the right job. I use C++, Perl, and several other languages; I don't believe there is any one language that's best for all purposes. -- Matt Austern He showed his lower teeth. "We matt@physics.berkeley.edu all have flaws," he said, "and http://dogbert.lbl.gov/~matt mine is being wicked."