Java or C++?
d3vvnull at gmail.com
Tue Apr 15 14:39:21 CEST 2008
I'm shocked. I've seen no mention of Smalltalk at all. Which should be soo
I would take an incremental approach. Learn Java first, since it is still
OO, offers a rich set of libraries for just about every task but requires a
bit more work. C++ requires that you do more work still (build more of your
own classes or find more third-party frameworks to do what you need to do),
work with the Standard Template Library, distinguish between references and
pointers, choose between implementing an OO mechanism (such as IO with
iostreams) or traditional (fprintf, printf,etc.).
C requires that you shift out of the OO paradigm completely and manage your
data and operations separately without the benefit of classes. If you read
the Extending Python documentation, you will see how much more work C has to
do to make Python possible at all.
2008/4/15 Ivan Illarionov <ivan.illarionov at gmail.com>:
> On 15 апр, 07:46, Brian Vanderburg II <BrianVanderbu... at aim.com>
> > C has the advantage that it does not to anything behind your back. This
> > is very useful especially for any form of system development or where
> > you must know exactly what is going on. It is still possible to do
> > 'object oriented' development in C, it just requires some more typing to
> > set up whatever is needed. Even things like COM for windows can be done
> > in C, it just requires manually building the 'vtable' so to speak.
> > Also, C seems to avoid the use of temporaries where as C++ can use them
> > in conversions and assignments automatically if needed.
> Great point. It's also possible to do Python object-oriented
> programming in C. 'PyMethodDefs' are the same 'vtables'. I've found
> that Python/C API is not that hard, the problem is a lack of good
> tutorials and false assumptions that ctypes or SWIG are somehow
> better. After `#include Python.h` C becomes very Python friendly.
| _ | * | _ |
| _ | _ | * |
| * | * | * |
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list