Skip to content

Comment on The C Programming Language - Part 0parent

Comments

Minor semantic point:

    Pretty much anything that's not a function is considered to be an object.
In general, the definition of object is incredibly wishy-washy and the word really ought to be retired, but as it stands, I don't think many people would agree that just any old piece of non-function data is an object. Different languages/people/formal systems have different definitions; for example, in Python, functions are themselves objects, while Java makes a clear distinction between objects and non-object primitive types like ints.

Mind you, this is as much a criticism of the original article's usage as yours; from a certain point of view (e.g. C++'s), C of course supports 'objects' inasmuch as you can store function pointers in structs and consequently have run-time selection of functions, after a fashion. From another point of view (e.g. Alan Kay's), even C++ does not have objects, because it lacks true message passing. The real criticism is that the term 'object' is so vague as to be essentially meaningless without clear context.

AboutSource Built by g1lg1l

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