I actually like Perl statement modifiers; they can make code more readable if used judiciously. Something like:
return unless $DEBUGGING;
can be pretty useful. Obviously, something like:
$a += $b * complex_function($c, $d, $e) unless ($x > 100.7 && pre_condition($d, $c, $e));
is not good.
- strings terminated by a binary zero rather than their physical size. Who the hell thought that would be a good idea?
Zero termination is simpler, and more flexible. Also, it avoids having to choose the appropriate number of bytes for the size field. Besides, if you want strings with size field, it's simple enough to implement that yourself.
- sizeof(string) (I may have got the name of the function wrong) returns the length of a single byte rather than the length of the entire string. Who the hell thought that would be a good idea?
Hey, just because you don't know the language doesn't mean it's necessarily wrong. Documentation for sizeof would have told you that it's for telling you the size in bytes of datatypes on a particular system. It's often paired with malloc to allocate memory for something.
The C specification is remarkably lax on the size of its numeric datatypes, too. To the point where eventually a bunch of bit-specific sizes were introduced because the basic versions weren't. example: uint32 is a 32-bit unsigned integer, where as uint is an unsigned integer that's 16-bits or larger depending on the platform.
For that matter, even pointer size changes depending on systems. For instance, it's 4 bytes for 32-bit Intel systems and 8 bytes for 64-bit Intel systems.
"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."