If PHP, Perl and Python are all one needs, then why is Perl written in C?
I don't know C at all, but I think that it may still be the most important language. The ubiquity of C compilers is what makes the ubiquity of Perl possible. If the Perl source code could not be compiled in a stable way using C on so many platforms then Perl would not be the universal duct tape that it is.
| [reply] |
Perl can be compiled on many platforms because its code is written that way. C is a great language for system programming and number crunching; but don't confuse good programming with a good language.
| [reply] |
I use both Perl and C++ both professionally and recreationally, but for me they scratch two very different itches.
Perl is quick to develop, and relatively simple to understand. With the usage of CPAN modules I can generally get the task done with minimal hassle. The use of regular expressions and syntax-supported hashes makes throwing data round almost pleasurable, and it's flexability and 'Doing the right thing'-mindset means it's a language which Just Works.
C++ is a cannon. I use it when I need to reach deep into system internals, or when I need a particular program to work at remarkable speeds. Using C++ is a minefield, there's a good reason two of the C++ books I use most are full of language Gotchas (Meyer's "Effective C++" and "More Effective C++"). C++ doesn't play nicely, C plays less nicely in my opinion whilst being a smaller language.
Often I'll end up combining the two, using Perl to control my C++ by expanding the two.. this way I'm getting C++'s sheer firepower, whilst the flame-retardant Perl stops my hands getting too burned.
Two language, two needs.. just don't get me onto why I sometimes choose to use Java and Assembler. After all, you could argue that Assembler is the most important language since almost every C/C++ compiler will compile to Assembler and actually use that to build the final product. Abstractation and usability are useful things, as is enjoying the job.
Yes, I did C before I did C++.. I am aware they're far from being the same language. The reason I used C++ as my example is it's what I do use nowadays, and that barring ultra low-level embedded stuff I think the two can successfully target the same areas.
| [reply] |