|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Re: do design patterns still apply with Python?Roy Smith wrote:
> >> For example, the Factory pattern is mostly to work around the fact that >> it's difficult in Java and C++ to dynamically load classes. > > You're over-specifying. Most of most design patterns is to work around the > fact that it's difficult in Java and C++ to do many things. +1 QOTW! --Irmen -- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: do design patterns still apply with Python?gene tani <gene.tani@...> wrote:
... > There's a couple Alex M slideshows and a couple discussions of > Creational/Structural / Behavioral patterns > > http://www.strakt.com/docs/ep04_pydp.pdf And more of my stuff (including slideshows on Design Patterns in Python, and one essay "Five easy pieces" on the Borg DP) can be found by starting at my homepage, http://www.aleax.it -- I've long dreamed of writing a book about Design Patterns and methodology in/for/with Python, but, it's unlikely to happen any time soon. > i think mostly i flip thru the Oreilly cookbook whenever i need > something. Yes, we have substantial numbers of DPs there, too, both 1st and 2nd editions (more, I believe in the 2nd ed). Alex -- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: do design patterns still apply with Python?"Paul Boddie" <paul@...> writes:
> > Sandboxed code is a real obvious one. > > I don't disagree that this is true in general, but is that actually > covered in the design patterns book [1] or in other related literature? It's been a while since I looked at the design patterns book and I don't know whether it discusses sandboxing. I'd guess probably not. As for whether any of the GoF book patterns are easy in Java but difficult in Python, it's a good question and I don't know the answer. Maybe the book has some patterns involving interfaces. I'm a rather low-tech Java user and I'm not a fan of the language, so I'm not a good person to ask. -- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: do design patterns still apply with Python?A lot of the complexity of design patterns in Java falls away
in Python, mainly because of the flexibility you get with dynamic
typing. For a Pythonic Perspective on Patterns, "Python Programming Patterns" by Thomas W. Christopher is definitely worth tracking down. It looks like it is out of print, but you can find used copies on Amazon. Regards, Paul.
-- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: do design patterns still apply with Python?Paul Novak 写道:
> A lot of the complexity of design patterns in Java falls away in > Python, mainly because of the flexibility you get with dynamic typing. > I agree with this very much ! In java or C++ or all such static typing and compiled languages , the type is fixed on in the compile phrase , so for the flexible at the runtime , we often need to program to interface . For example , we do in java : implement I{...} class A implement I{...} class B implement I{...} oprate(I var) // we can pass A's instance or B's instance here and in C++ : class Abstract{...} class A : Abstract{...} class B : Abstract{...} oprate(Abstract var) // pass the A's instance or B's instance here But in python , type is dynamic , and name is bind at runtime , so we can pass any variable as we want ! This feather make python not need for redundant class inherits and interfaces which are the core of the GoF's design patterns I think ! > For a Pythonic Perspective on Patterns, "Python Programming Patterns" > by Thomas W. Christopher is definitely worth tracking down. It looks > like it is out of print, but you can find used copies on Amazon. > > Regards, > > Paul. > > > This sounds like an article crying out to be written, > "(Learning) Design Patterns with Python". > > Has it been written already? > > Cheers, > Terry > > > Bruce Eckel began writing "Thinking In Python" it was last updated > in 2001. > -- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: do design patterns still apply with Python?Paul Novak :
> A lot of the complexity of design patterns in Java falls away in > Python, mainly because of the flexibility you get with dynamic typing. > I agree with this very much ! In java or C++ or all such static typing and compiled languages , the type is fixed on in the compile phrase , so for the flexible at the runtime , we often need to program to interface . For example , we do in java : implement I{...} class A implement I{...} class B implement I{...} oprate(I var) // we can pass A's instance or B's instance here and in C++ : class Abstract{...} class A : Abstract{...} class B : Abstract{...} oprate(Abstract var) // pass the A's instance or B's instance here But in python , type is dynamic , and name is bind at runtime , so we can pass any variable as we want ! This feather make python not need for redundant class inherits and interfaces which are the core of the GoF's design patterns I think ! > For a Pythonic Perspective on Patterns, "Python Programming Patterns" > by Thomas W. Christopher is definitely worth tracking down. It looks > like it is out of print, but you can find used copies on Amazon. > > Regards, > > Paul. > > > > This sounds like an article crying out to be written, > "(Learning) Design Patterns with Python". > > Has it been written already? > > Cheers, > Terry > > > Bruce Eckel began writing "Thinking In Python" it was last updated > in 2001. > -- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: do design patterns still apply with Python?msoulier wrote:
> I find that DP junkies don't tend to keep things simple. +1 QOTW. There's something about these "political" threads that seems to bring out the best quotes. b^) -- http://mail.python.org/mailman/listinfo/python-list |
|
|
Re: do design patterns still apply with Python?I am a fan of these people:
Goldie Hawn Kate Hudson Oliver Reed Robert Conrad Vic Morrow Bill Bixby
![]() |
|
|
Re: do design patterns still apply with Python?I am a fan of Oliver Reeds since a toddler
|
|
|
Re: do design patterns still apply with Python?I think the world of Oliver Reed, and I was so sad to learn about his death. I always had a crush on Oliver Reed, and I have been a fan for over 35 years now. I was born on June 13, 1972, and I am 35 years old.
![]() |
|
|
Re: do design patterns still apply with Python?To answer the OP's question: GOF design patterns that solve problems due to
static typing (and there are some) are not needed with Python. Others do apply and can be useful. There have been various mentions in c.l.p over the years. -- http://mail.python.org/mailman/listinfo/python-list |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |