How does perl relate?? There are major differences in syntax, scope, etc. You are not directly responsable for memory management, etc. But perl allows you to get pretty "C"ish with your code if you like.
That said, Perl will familiarize you with loops, cases, and good logical program flow. Most any language will do this. Perl, however, also supports OO, Modules (aka libraries), references, etc... These are essential for a C/C++ programmer. Using Komodo or other IDE will acquaint you with an IDE and a debugger as well.
Finally the perl to C translators are good because you can see your perl program flow implemented in the other language. Also, the clean-up will acquaint you with C without having to start the project that way. (Which can be daunting.)
To make a catchy phrase out of it, How much does learning welding prepare you for blacksmithing??
But if you are planning to program C/C++, you could do worse than perl.
~Hammy
| [reply] |
So, er, why did people downvote this? Seriously.
I'm quite curious. Just wanted to get that all-votes-cast
XP bonus and needed a node to downvote or something?
How does Perl relate to C(++)? Perl does string munging
like nothing else on the planet. Perl has integrated hashes
that work incredibly well. Perl has a remarkably
transparent object model, far more so than any other OO
language that I've encountered (this excludes Smalltalk, for
the record). Perl is incredibly idiomatic, almost as much
so as vi and its clones. Perl has regular expressions that
make the Goddess envious. For small programs, glue, system
administration and data munging, Perl is an ideal language.
And Perl has CPAN. CPAN is so effective a resource that it
makes all of OOP's claims about software reuse seem lame by
comparison.
On the other hand, Perl doesn't give you much access to
the computer's internals. Perl won't let you dictate much
in the way of memory layout. Perl won't let you specify
whether you're using 8, 16, 32, or 64 bits for a particular
integer. Perl doesn't generate predictable machine code.
If you want to do something really, really fast, Perl
probably isn't what you want, and if you want to massage
your VGA card into giving your 400x300x8bit resolution, Perl
probably isn't what you want either.
Oh, and C+ isn't a mainstream language, it's a soft
drink.
--
:wq
| [reply] |
You should get the Advanced Perl Programming book from O'Reilly. It has comparisons to other languages in every chapter. And then there's "Perl versus...". | [reply] |
For a very nice comparison of Perl vs. other OO languages,
notably C++, see Appendix B of Object Oriented Perl by Damian Conway.
If you really want to understand the issues in comparing
one language to another, you should read Essentials of Programming Languages.
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
| [reply] |