[TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

Ian Kelly ian.g.kelly at gmail.com
Fri Apr 19 12:38:31 EDT 2013


On Fri, Apr 19, 2013 at 4:16 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Fri, 19 Apr 2013 12:02:00 -0400, Roy Smith wrote:
>
>> PS: a great C++ interview question is, "What's the difference between a
>> class and a struct?"  Amazing how few self-professed C++ experts have no
>> clue.
>
> I'm not a C++ expert, but I am an inquiring mind, and I want to know the
> answer!

C++ class members are private by default; struct members are public by
default.  That's the only difference as I recall.



More information about the Python-list mailing list