Re: Implicit initialization is EXCELLENT
- From: Stefaan Himpe <stefaan.himpe@xxxxxxxxx>
- Date: Tue, 05 Jul 2011 21:31:44 +0200
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 the top of my head of any types that require a separate
open/start/activate call before they are usable.
database connections, network connections, spawning expensive processes/threads, things that benefit from lazy evaluation...
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 perhaps it's time for recalibration (after all, summer season started) :-)
Best regards,
Stefaan.
.
- Follow-Ups:
- Re: Implicit initialization is EXCELLENT
- From: Steven D'Aprano
- Re: Implicit initialization is EXCELLENT
- References:
- Implicit initialization is EXCELLENT
- From: Steven D'Aprano
- Implicit initialization is EXCELLENT
- Prev by Date: Re: emacs lisp text processing example (html5 figure/figcaption)
- Next by Date: Re: wx MenuItem - icon is missing
- Previous by thread: Implicit initialization is EXCELLENT
- Next by thread: Re: Implicit initialization is EXCELLENT
- Index(es):
Relevant Pages
|