Second sentence in the PDF: [i]At the core, there is little more to it then finally applying the good programming principles which we have been taught for more then twenty years.[i] this looks legit to me
Name:
Anonymous2012-02-28 18:49
>>7
But it's not. It uses pure ANSI-C and can be compiled with any standard C compiler.
Name:
Anonymous2012-02-28 22:48
>>6
1. really? I find classes to be the only usable feature in seeples. Well that and namespaces and templates (although templates suck).
>>10
Classes are actually like eleven different features and >>6 was pretty reckless to call them the same feature. For example the method invocation syntax is pretty convenient in a lot of ways but it doesn't automatically have something to do with inheritance (obviously, since languages like Go support one but not the other) or function/operator overloading (which is most useful for the multiple dispatch abilities).
Come to think of it categorizing C++ shit is just hella difficult but we all know it's a giant mess of bad corner cases that interact in stupid ways so whatever. You can't even really say that something is an individual feature with certainty and it's just... terrible!
FILE* is an example of object-oriented C. It can refer to a file, device, standard stream (like stdin), or in POSIX, anything that can use a file descriptor such as sockets or pipes. Some extensions add a form of inheritance. If fmemopen and open_[w]memstream (which are in POSIX-2008 and TR 24731-2) get added to the C standard then FILE*s could be used as automatically managed buffers. Instead of worrying about buffer overflows or whether data is in static, automatic or dynamic memory, or in a file, device, or socket, just pass a FILE*. fopencookie could be used to replace wrappers around FILE* like the gzFile used by zlib with real FILE*s. These can be used with other wrappers forming a stack. The cookie_io_functions_t is like a table of virtual methods.
>>15
You have a very narrow view of what ``object-oriented'' means !
A FILE* is a reference to something that has a set of operations/methods that can be applied on it (common interface). How it's implemented is not important (concrete class), and there can be many different instances with different behavior that all allow th f* functions to be called on them (interface inheritance). That's quite ``object-oriented''.