C++ version of the C Python API?
Nicholas Bastin
nick.bastin at gmail.com
Mon Oct 22 01:33:01 EDT 2007
On 10/21/07, Robert Dailey <rcdailey at gmail.com> wrote:
> On 10/21/07, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> > No, I literally meant that the Python C API is object-oriented.
> > You don't need an object-oriented language to write object-oriented
> > code.
>
> I disagree with this statement. C is not an object oriented language,
> and I've seen attempts to make it somewhat object oriented, however it
> failed miserably in readability and manageability overhead. However,
> this isn't the place to discuss such a thing so I've got nothing more
> to say than that.
Object-oriented programming is a design choice, not a language
feature. You can write straight procedural code in C++, and you can
write object oriented code in C. Sure, C++ has some language features
which facilitate object-oriented programming, but it doesn't magically
make your code object-oriented. You can certainly write basic
object-oriented code in C and hide most of the implementation in
preprocessor macros if you so desire.
--
Nick
More information about the Python-list
mailing list