LWN.net Logo

Bleagh

Bleagh

Posted Apr 17, 2012 10:11 UTC (Tue) by dgm (subscriber, #49227)
In reply to: Bleagh by jd
Parent article: PHP: a fractal of bad design (fuzzy notepad)

> Different C libraries implement different malloc strategies, different levels of sanity-checking, and even different levels of detail in errors.

Come on. The last one is false (errors in libraries?), and none of the three is part of the semantics. C has it's quirks, certainly, but they are not those you listed.

Take for instance the many operations that can trigger undefined or platform specific behavior. *That* can make code unpredictable. One has to take into account, though, that such code is considered buggy, or at least fragile, and they are well documented.

There are also some obscure points in the language that should have been left out. The comma operator, for instance. But all in all, C is very pleasant and predictable. For some reason, more pleasant than more orthogonal languages like Pascal (hey, that's _my_ personal opinion).

> That means that the same C program will run differently in different environments.

That means that _buggy_ C programs _may_ run differently in different environments. Which is not surprising, if you ask me.


(Log in to post comments)

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