On Thu, Jul 7, 2011 at 1:12 AM, Ulrich Eckhardt
wrote:
>>> Just guessing, is it legacy, C-with-classes code rather than C++ code
>>> perhaps? Haven't looked at wx for a while. Such code typically lacks
>>> understanding of exceptions, which are the only way to signal failure
>>> from e.g. construc
Ian Kelly wrote:
> On Wed, Jul 6, 2011 at 12:49 AM, Ulrich Eckhardt
> wrote:
>> Mel wrote:
>>> In wx, many of the window classes have Create methods, for filling in
>>> various attributes in "two-step construction". [...]
>>
>> Just guessing, is it legacy, C-with-classes code rather than C++ code
Stefaan Himpe wrote:
>
>> No! I was serious. I've spent *ages* trying to find the link to the
>> article... if you know it, please share.
>
> Ok - I thought you were referring to some troll's rant with similar
> title. I'm probably way off, but were you referring to the RAII technique?
>
> http
Ian Kelly wrote:
> On Wed, Jul 6, 2011 at 12:49 AM, Ulrich Eckhardt
> wrote:
>> Mel wrote:
>>> In wx, many of the window classes have Create methods, for filling in
>>> various attributes in "two-step construction". I'm not sure why,
>>> because it works so well to just supply all the details wh
On Wed, Jul 6, 2011 at 12:49 AM, Ulrich Eckhardt
wrote:
> Mel wrote:
>> In wx, many of the window classes have Create methods, for filling in
>> various attributes in "two-step construction". I'm not sure why, because
>> it works so well to just supply all the details when the class is called
>>
No! I was serious. I've spent *ages* trying to find the link to the
article... if you know it, please share.
Ok - I thought you were referring to some troll's rant with similar
title. I'm probably way off, but were you referring to the RAII technique?
http://en.wikipedia.org/wiki/Resource_A
Stefaan Himpe wrote:
>> Now, I have an ulterior motive in raising this issue... I can't find the
>> original article I read! My google-fu has failed me (again...). I don't
>> suppose anyone can recognise it and can point me at it?
>
> My sarcasm detector warns me not to add a link, although perha
Mel wrote:
> In wx, many of the window classes have Create methods, for filling in
> various attributes in "two-step construction". I'm not sure why, because
> it works so well to just supply all the details when the class is called
> and an instance is constructed. Maybe there's some C++ strateg
rantingrick wrote:
> On Jul 5, 10:26 am, Steven D'Aprano > Since you can't do anything without a root window, I don't see the
>> benefit in forcing the user to do so [create one explicitly].
>
> The reason is simple. It's called order. It's called learning from day
> one how the order of things ex
On Wed, Jul 6, 2011 at 1:45 PM, rantingrick wrote:
>> If you force too much on people, they'll go
>> elsewhere.
>
> Why all this running away with tail between legs?
> Do these these people have extremely small eggs?
> I wish they would stand firm and put up a fight
> instead they're just cowa
On Jul 5, 9:44 pm, Chris Angelico wrote:
> On Wed, Jul 6, 2011 at 11:53 AM, rantingrick wrote:
> > So you would start drivers education class with road construction? Or
> > the history of the internal combustion engine? Who cares about
> > actually *driving* the car.
>
> I believe that starting d
On Wed, Jul 6, 2011 at 11:53 AM, rantingrick wrote:
> So you would start drivers education class with road construction? Or
> the history of the internal combustion engine? Who cares about
> actually *driving* the car.
>
I believe that starting driver ed with some basics of how an internal
combus
On Jul 5, 10:26 am, Steven D'Aprano wrote:
> This is not strictly Python, although it is peripherally relevant.
>
> Some month or three ago, I read an article or blog post about API design,
> specifically the wrong-headedness of insisting that callers manually
> initialise instances using a separa
In John Gordon writes:
> which praised the bendfists of implicit initialization.
Wow, that's quite a typo! I meant "benefits", of course.
--
John Gordon A is for Amy, who fell down the stairs
gor...@panix.com B is for Basil, assaulted by bears
In Stefaan Himpe
writes:
> > Now, I have an ulterior motive in raising this issue... I can't find the
> > original article I read! My google-fu has failed me (again...). I don't
> > suppose anyone can recognise it and can point me at it?
> My sarcasm detector warns me not to add a link, althou
Hello,
I agree with the contents of this post.
I see a similar problem with API's requiring to initialize all kinds of
data using setters/properties instead of receiving it in the initializer
(or constructor).
Python generally follows this design. Apart from files, I can't easily think
off
Steven D'Aprano wrote:
[ ... ]
> Python generally follows this design. Apart from files, I can't easily
> think off the top of my head of any types that require a separate
> open/start/activate call before they are usable. It's also relevant to
> tkinter, which will implicitly create a root window
Hi!
+1
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
This is not strictly Python, although it is peripherally relevant.
Some month or three ago, I read an article or blog post about API design,
specifically the wrong-headedness of insisting that callers manually
initialise instances using a separate step after creation.
The argument goes, if your A
19 matches
Mail list logo