Unfortunately, C++ internals change from compiler to compiler, even from same manufacturer between updates, making impossible usable C++ dynamic libraries safely (C calling conventions are standard, while that is not enough for C++, because of class handling). Unless that becomes solved, C++ will never be able to compete with C for library and system development.
I will struggle my way through this, having mostly given up on "Inside the C++ Object Model" by Stan Lippman. I have heard it said that Lippman's book is very out of date and a lot of it doesn't apply to modern compilers.
Link seems to be down, although some of it is cached by google. Is there a way to use google webcache to edit the hyperlinks in a cached article so that they point to cached versions of the target?
I thought Lippman's book was adequate. And if you're familiar with the implementation of various statically-typed object models (oxymoron?) then you can see a few ways suggest themselves.
Depends on what you want to do with this knowledge. If you want to use this knowledge for gains in performance, you will have to get your hands dirty and dig into specific implementations.
In our past games, we had extensive C++ serialization (marshalling, pickling, whatever you call it).
We had to fight gcc 2.95, metrowerks, and few other compilers putting the "virtual table pointer" at different places - begining of object, end, etc. Then alignment differences (not strictly C++), and bitfields. Hopefully mangling was avoided, as we did not had to reference at runtime the data, we had pointers.
It was quite messy, and you could not reuse exported data - had to be for each platform/compiler.
PDOException: SQLSTATE[HY000] [2002] Can't connect to local
MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
in lock_may_be_available() (line 165 of
/srv/www/avabodh.com/public_html/includes/lock.inc).
C++ cannot be explained fully with simple and safe C code. For example, theoretically one could implement the most basic usage of templates with macros; it would however not be easy to work with (error message in the wrong places) and it would still not emulate e.g. template specialization.
[+] [-] faragon|15 years ago|reply
[+] [-] eliasmacpherson|15 years ago|reply
Link seems to be down, although some of it is cached by google. Is there a way to use google webcache to edit the hyperlinks in a cached article so that they point to cached versions of the target?
[+] [-] mahmud|15 years ago|reply
Depends on what you want to do with this knowledge. If you want to use this knowledge for gains in performance, you will have to get your hands dirty and dig into specific implementations.
[+] [-] malkia|15 years ago|reply
We had to fight gcc 2.95, metrowerks, and few other compilers putting the "virtual table pointer" at different places - begining of object, end, etc. Then alignment differences (not strictly C++), and bitfields. Hopefully mangling was avoided, as we did not had to reference at runtime the data, we had pointers.
It was quite messy, and you could not reuse exported data - had to be for each platform/compiler.
[+] [-] cawhitworth|15 years ago|reply
[+] [-] phaedrus|15 years ago|reply
[+] [-] swah|15 years ago|reply
[+] [-] njs12345|15 years ago|reply
[+] [-] rdtsc|15 years ago|reply
http://library.gnome.org/devel/gobject/stable/
[+] [-] jpr|15 years ago|reply
[+] [-] mahmud|15 years ago|reply
The difference is cost; you have to link against C code, for some platforms, what C++ provides for free on all platforms.
[+] [-] roel_v|15 years ago|reply
[+] [-] danssig|15 years ago|reply