Note that all of the arguments can be applied to perl itself as well.
- LEARNING: Have you learned how to write hash functions, deal with signals, IO, and how to create a regexp engine? If not, it's better to use C and learn all those things than to use Perl.
- PERFECTION: Perl is slow. A perfectionist would write their stuff in C and have most of its stuff working orders of a magnitude faster.
- PURPOSE: many of the constructs Perl offers me don't exactly do what you need -- you'd be better of writing C primitives.
- APPEARANCE: Ever tried installing Perl and the myriad of modules and files that come with it? Just the endless list of questions being asked at Configure time alone. No, in other to not lose your precious access, it's much better to install a compiled C program (one file!) instead of the dozens and dozens of Mb of a Perl install.
- PORTABILITY: Perl won't run on boxes that you cannot compile on or cross-compile to. But there'll be some platforms your C program can be compiled on (or cross-compiled to) where Perl doesn't. So, for portability reasons, C program are superiour to Perl programs.
- CPAN ACCESS: You don't need any for a C program. Not even to install Perl from.
- COMPILING: Well, you got me here. If you don't have a C compiler, you cannot compile a C program. But wait, you cannot compile perl then either! So, this one will be a tie.
- COMPLEXITY: It doesn't make sense to install Perl for a one-off script, and then to remember to use /home/me/bin/perl each time you run it.
- SIZE: Buhahhaha. Perl is a memory hog, and that's before it's doing anything. People have written entire OSses with a full POSIX tool chain in less memory than Perl even needs to run perl -e "1".
- LICENSING: Perl gives you the option to either use the GPL, or the lawyers-field-day Artistic License. Legal may prefer you sticking to your C compiler.
- JOB: You're paid to write code, not to download perl. That would be cheating. Better build your own table and chair, given an acorn to start with. Anything else would be cheating.
I think C beats Perl 10.5 - 0.5 using your "reasons".
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||