To expand on
chromatic's comment, you can actually have strings with embedded \0's and it all "Just Works". Without me having to worry about anything.
This goes back to one of my primary rules for software development - have as few moving parts as possible that you have to maintain. This is why I use modules as much as possible, even for the simplest of things. The closer my code is to my problemspace and the fewer moving parts I have to maintain, the better off I am. So, whenever I have to worry about the flag that says "My string ends here", that's an extra moving part. Whenever I have to worry "Did I free everything correctly?", that's an extra moving part. And, so on.
So, no, I don't believe that Perl-written-as-C is more powerful. In fact, Perl-written-as-Perl is much more powerful than C can ever be, from a developer perspective. Of course, hand-tuned C is going to be faster, smaller, and all that jazz. But, frankly, it's cheaper, from the business's perspective, to buy another machine than pay me for a week of my time. So, that's a non-starter.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.