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

Ned Batchelder ned at nedbatchelder.com
Fri Apr 19 12:41:03 EDT 2013


On 4/19/2013 12:16 PM, Steven D'Aprano 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!
>
>
The only difference between a class and a struct is that classes default 
to "private" access for their members, and structs default to "public".

--Ned.



More information about the Python-list mailing list