Functional programing is getting the presses in mainstream. I ran
across this dialogue where a imperative coder was trying to get into
functional programing:
A: What are the design patterns that help structure functional
systems?
B: Design patterns? Hey everyone, look at the muggle try to get
On May 8, 4:57 pm, Alan Isaac <[EMAIL PROTECTED]> wrote:
> Ville M. Vainio wrote:
> > in case of stocks, you are probably monitoring several
> > stock objects, so the stock should probably pass itself to
> > the observer
>
> OK. This is related to my question #2 (in a separate
>
> thread), where I
Ville M. Vainio wrote:
in case of stocks, you are probably monitoring several
stock objects, so the stock should probably pass itself to
the observer
OK. This is related to my question #2 (in a separate
thread), where I'd also appreciate your comments.
analogous to a typical U
Alan Isaac <[EMAIL PROTECTED]> writes:
> the following: "OK, here's the pattern, now your listener
> wants to know the event source, do not ask something new the
> subject to respond to that need. That is unnecessary
> coupling. Instead, just rewrite your listener to maintain
> a reference to th
Alan Isaac <[EMAIL PROTECTED]> writes:
Is anything lost by not maintaining this reference (other
than error checking ...)? If I feel the observer needs
access to the subject, what is wrong with just having the
subject pass itself as part of the notification?
Ville M. Vainio wrot
Alan Isaac <[EMAIL PROTECTED]> writes:
> Is anything lost by not maintaining this reference (other
>
> than error checking ...)? If I feel the observer needs
>
> access to the subject, what is wrong with just having the
>
> subject pass itself as part of the notification?
It reduces the number
I have two questions about the "observer pattern" in Python.
This is question #2. (I'll put the other is a separate post.)
Consider this standard example of the observer pattern in Python:
http://en.wikipedia.org/wiki/Observer_pattern>
Now suppose I have a variant.
(I am not a programm
I have two questions about the "observer pattern" in Python.
This is question #1. (I'll put the other is a separate post.)
Here is a standard example of the observer pattern in Python:
http://en.wikipedia.org/wiki/Observer_pattern
Contrast with this rather standard discussion:
http:/
Scott David Daniels a écrit :
> cantabile wrote:
>
>> bruno modulix a écrit :
>>
>>> You may want to have a look at the Factory pattern...
>>> ... demo of class Factory ...
>
>
> Taking advantage of Python's dynamic nature, you could simply:
> # similarly outrageously oversimplified dummy ex
cantabile wrote:
> bruno modulix a écrit :
>>You may want to have a look at the Factory pattern...
>> ... demo of class Factory ...
Taking advantage of Python's dynamic nature, you could simply:
# similarly outrageously oversimplified dummy example
class Gui(object):
def __init__
bruno modulix a écrit :
> You may want to have a look at the Factory pattern...
>
> # outrageously oversimplified dummy exemple
> class Gui(object):
>def __init__(self, installer):
> self.installer = installer
>
> class PosixGui(Gui):
>pass
>
> class Win32Gui(Gui):
>pass
>
> c
cantabile wrote:
> Hi,
>
> I'm trying to write a small installer for a server. But this program
> should be able to run in the future under heterogenous environments and
> os (at least linux/windows). I mean, the install will be done either in
> text mode or curses or gtk or tk, either in debian o
Hi,
I'm trying to write a small installer for a server. But this program
should be able to run in the future under heterogenous environments and
os (at least linux/windows). I mean, the install will be done either in
text mode or curses or gtk or tk, either in debian or windows 2000 and
so on...
13 matches
Mail list logo