
To view parent comment, click here.
To read all comments associated with this story, please click here.
I'd suggest you take a couple of basic C courses, as your comment was -way- of the mark.
Nothing stops from implementing objects in pure C. Come to think about it, more-or-less any language that support functions, complex storage [e.g. arrays] and callback functions, can implement objects.
Heck, I can even implement objects (including inheritance) in BASH or assembly!
Now, whether -you- consider that true object oriented language (as it requires some additional foot work to implement objects), is irrelevant.
... I'd think twice before calling someone arrogant.
(Keep in mind that I don't really agree with the OP)
- Gilboa
Edited 2010-10-13 13:26 UTC
Nothing stops me from implementing objects in pure C?
Well, of course I knew that, but what's your point?
OO paradigm is a super-set of procedural programming, thus it is obvious that the same functionality can be achieved in a procedural language.
In a broader sense, any currently used paradigm can be implemented in an assembler, but does that mean that we should use assemblers for everything?
The question is why would you bother to use C to emulate C++ (unless you have to for some reason, e.g. for backward compatibility or to work around compiler limitations)?
It's very relevant because it is not a matter of opinion. C is not object-oriented. Period.
Besides, that OO-C thing is just the bit that caught my eye. When someone claims that C is the way to go for web development, I naturally assume that they don't have a clue. Call it a prejudice, but I'm rarely wrong.
In the world where web apps are barely secure even though they are written in high level languages like Java, the last thing we need it to return to buffer overflows, dangling pointers, etc.
Edited 2010-10-13 14:25 UTC
You can still use object oriented concepts in a language which doesn't (strictly speaking) support objects. C is a great example of one of those languages.
If you really want to, you can even create a sort of object in C, using a structure with data and pointers to functions.
Granted, if you're doing so, it's probably best to switch to C++...
Member since:
2009-04-24
You were awake when they said that C is not object-oriented, right?
Such arrogance and no knowledge to back it up.