From: Bruno Desthuilliers on
WANG Cong a �crit :
> On 06/25/10 17:25, Steven D'Aprano <steve(a)REMOVE-THIS-cybersource.com.au> wrote:
>
>> On Fri, 25 Jun 2010 14:15:12 +0100, WANG Cong wrote:
>>
(snip)
>>> 4) Also, this will _somewhat_ violate the OOP princples, in OOP, this is
>>> and should be implemented by inherence.
>> Perhaps, and perhaps not. But Python has never pretended to slavishly
>> follow OOP "principles". Python does what works, not necessarily what is
>> a "pure" design. Python has functional programming, procedural
>> programming, and OO programming, and happily mixes them all together.
>>
>
> "Happily mixes them all together" doesn't mean it is elegant. :)

Python has no pretention at "elegance". It's a _very_ practical
language. It's designed to help you get the job done, period.
From: Carl Banks on
On Jun 27, 3:49 am, Bruno Desthuilliers
<bdesth.quelquech...(a)free.quelquepart.fr> wrote:
> WANG Cong a écrit :
>
> > On 06/26/10 00:11, Neil Hodgson <nyamatongwe+thun...(a)gmail.com> wrote:
>
> >> WANG Cong:
>
> >>> 4) Also, this will _somewhat_ violate the OOP princples, in OOP,
> >>> this is and should be implemented by inherence.
> >>    Most object oriented programming languages starting with Smalltalk
> >> have allowed adding attributes (addInstVarName) to classes at runtime.
>
> > Thanks, I have to admit that I know nothing about Smalltalk.
>
> Then you really don't know much about OO.

I don't really know much about Smalltalk either.


Carl Banks
From: Stephen Hansen on
On 6/27/10 10:10 PM, Carl Banks wrote:
> On Jun 27, 3:49 am, Bruno Desthuilliers
> <bdesth.quelquech...(a)free.quelquepart.fr> wrote:
>> WANG Cong a �crit :
>>
>>> On 06/26/10 00:11, Neil Hodgson<nyamatongwe+thun...(a)gmail.com> wrote:
>>
>>>> WANG Cong:
>>
>>>>> 4) Also, this will _somewhat_ violate the OOP princples, in OOP,
>>>>> this is and should be implemented by inherence.
>>>> Most object oriented programming languages starting with Smalltalk
>>>> have allowed adding attributes (addInstVarName) to classes at runtime.
>>
>>> Thanks, I have to admit that I know nothing about Smalltalk.
>>
>> Then you really don't know much about OO.
>
> I don't really know much about Smalltalk either.

Same. I've been informed that I find Objective-C rather "comfortable"
and strangely "Pythonic" because its object model is based in Smalltalk,
and although Python's a step or two farther removed (what with not
embedding smalltalkish directly into another language), is as well.

I don't think one needs to know Smalltalk to know much about OO. One
might need to know Smalltalk to understand the history and perhaps some
rationale of OO, _maybe_, but at this point-- the pure theory of OOP is
taught and discussed far and wide entirely outside of the context of
Smalltalk. Smalltalk may have originated it and may be one of the purest
forms of the concept, but...

To say you can't really know "much about" OOP without knowing "much
about" Smalltalk seems basically, well, wrong.

--

... Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/

From: geremy condra on
On Sun, Jun 27, 2010 at 6:49 AM, Bruno Desthuilliers
<bdesth.quelquechose(a)free.quelquepart.fr> wrote:
> WANG Cong a écrit :
>> On 06/26/10 00:11, Neil Hodgson <nyamatongwe+thunder(a)gmail.com> wrote:
>>
>>> WANG Cong:
>>>
>>>> 4) Also, this will _somewhat_ violate the OOP princples, in OOP,
>>>> this is and should be implemented by inherence.
>>>    Most object oriented programming languages starting with Smalltalk
>>> have allowed adding attributes (addInstVarName) to classes at runtime.
>>
>>
>> Thanks, I have to admit that I know nothing about Smalltalk.
>>
>
> Then you really don't know much about OO.

Guess I don't know much about OO then, despite having written OO code
for at least the last ten years...

Geremy Condra
From: Aahz on
In article <4c2747c1$0$4545$426a74cc(a)news.free.fr>,
Bruno Desthuilliers <bdesth.quelquechose(a)free.quelquepart.fr> wrote:
>
>Python has no pretention at "elegance".

That's not true at all. More precisely, I would agree with you if the
emphasis is on "pretention" but not if the emphasis is on elegance; I
think that Python is extremely elegant, and that elegance is one of the
attractions of Python for many people. In fact, PyCon 2009 had
"elegance begets simplicity" as its t-shirt slogan.
--
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/

"If you don't know what your program is supposed to do, you'd better not
start writing it." --Dijkstra