Skip to content

Comment on Anonymous functions in Cparent

Comments

...almost no room for ambiguity and subtle, invisible side effects. What you see is what you get. [emphasis mine]

The key word there is "almost." C does have lots of undefined behaviors.

If you don't hedge your statements about programming, you will invariably be wrong. There are always counter-examples.

The kind of ambiguity and side-effects I'm alluding to are ones programming languages explicitly support and encourage, like overloaded operators and overloaded methods in C++. In C, the effects of a segment of code are comparatively predictable just by looking at the code itself. In quite a large number of languages, you can't draw many conclusions about what a segment of code does without looking in multiple other places.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.