LWN.net Logo

PHP: a fractal of bad design (fuzzy notepad)

PHP: a fractal of bad design (fuzzy notepad)

Posted Apr 21, 2012 16:38 UTC (Sat) by apoelstra (subscriber, #75205)
In reply to: PHP: a fractal of bad design (fuzzy notepad) by rev
Parent article: PHP: a fractal of bad design (fuzzy notepad)

The use of the 'sizeof' operator is hardly a detail or quirk of the language -- it is absolutely crucial to any C program that uses dynamically allocated memory.


(Log in to post comments)

PHP: a fractal of bad design (fuzzy notepad)

Posted May 7, 2012 15:04 UTC (Mon) by rev (guest, #15082) [Link]

Agreed. One of the reasons C should be avoided like the plague.

PHP: a fractal of bad design (fuzzy notepad)

Posted May 8, 2012 8:49 UTC (Tue) by nix (subscriber, #2304) [Link]

It's when you find yourself using addition, subtraction, or (size_t)pow() on the result of sizeof() that you really know you're playing with the big boys.

(I've done the first two, but so far have restrained myself from the insanity required for the third, preferring to multiply by hand. How plebeian.)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds