Decorator for Enforcing Argument Types
Duncan Booth
duncan.booth at invalid.invalid
Fri Dec 22 08:00:16 EST 2006
"John Machin" <sjmachin at lexicon.net> wrote:
>
> Duncan Booth wrote:
>> "John Machin" <sjmachin at lexicon.net> wrote:
>> > You are saying that you think that George thinks that they are
>> > teaching efficient coding methods in OO classes??
>> >
>> No, but I hope they teach how to recognise patterns, and I imagine
>> they also teach something about refactoring to remove switches or
>> long if/elif chains. (My imagination may not, of course, bear any
>> resemblance to real life.)
>
> My point is that efficent coding methods, recognition of patterns and
> refactoring are *general* comp sci concepts, they are not special to
> OO. Why do you hope / imagine such things about OO classes?
>
Both things are applicable outside OO, but the OO community is where they
evolved.
The concept of design patterns was popularized by the Gang of Four in
"Design Patterns: Elements of Reusable Object-Oriented Software", and I
believe that the concept of refactoring also grew out of the OO community.
According to Wikipedia, which is occasionally not far wrong:
> The first known use of the term "refactoring" in the published
> literature was in the article, Refactoring: An Aid in Designing
> Application Frameworks and Evolving Object-Oriented Systems,
> Proceedings of the Symposium on Object Oriented Programming
> Emphasizing Practical Applications (SOOPPA) September, 1990, ACM by
> William F. Opdyke and Ralph E. Johnson.
More information about the Python-list
mailing list