> C generates compiled code. Code which is very efficient, but not as efficient as hand coded machine instructions.
...written by a perfect programmer.
> C is an easy language to write code in.
I think the word he was looking for was "simple". The field of land mines known as "undefined behaviour" disqualifies C as being an easy language.
> So you have to use pointers - which are nothing more than variables which contain addresses.
Except that they have their own semantics and syntax as well as their own fun set of undefined behaviour.
> This means you can define local variables which shadow external variables quite freely. This makes you code easier to read and safer to develop ...
Because everyone loves to keep track of which version of the 'count' variable you're referring to! (Seriously, there is almost never a reason to define the same variable name twice in the same function.)
> imperative: C statements are tasks to be executed in sequence. Hence imperative.
The word imperative doesn't imply a sequence...
> C doesn't support objects
Pretty much anything that's not a function is considered to be an object. C doesn't support polymorphic classes. (Well... let's not get into that!)
Overall, this might be useful to the author if he finds that he can't remember the details of the language for very long. Anyone not already familiar with the concepts he's talking about will be lost at best, or damaged in the average case.
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.
Comments
> C generates compiled code. Code which is very efficient, but not as efficient as hand coded machine instructions.
...written by a perfect programmer.
> C is an easy language to write code in.
I think the word he was looking for was "simple". The field of land mines known as "undefined behaviour" disqualifies C as being an easy language.
> So you have to use pointers - which are nothing more than variables which contain addresses.
Except that they have their own semantics and syntax as well as their own fun set of undefined behaviour.
> This means you can define local variables which shadow external variables quite freely. This makes you code easier to read and safer to develop ...
Because everyone loves to keep track of which version of the 'count' variable you're referring to! (Seriously, there is almost never a reason to define the same variable name twice in the same function.)
> imperative: C statements are tasks to be executed in sequence. Hence imperative.
The word imperative doesn't imply a sequence...
> C doesn't support objects
Pretty much anything that's not a function is considered to be an object. C doesn't support polymorphic classes. (Well... let's not get into that!)
Overall, this might be useful to the author if he finds that he can't remember the details of the language for very long. Anyone not already familiar with the concepts he's talking about will be lost at best, or damaged in the average case.
Minor semantic point:
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.