| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#71
| |||
| |||
| In article <ez%od.30089$5b1.2995@newssvr17.news.prodigy.com >, phlip_cpp@yahoo.com says... > Gerry Quinn wrote: > > > [And by doing something, I mean 'achieving a useful effect', not > > 'implementing a named pattern'.] > > Ah, yes, the possibility of Pattern Abuse is more than enough reason to > refuse to achieve a useful effect using a named pattern. A complete mis-reading of what I said. Consider the following programming task: "lighting a cigar". You have two languages "Matches" and "Lighter". "Matches" implements the "LightByStriking" pattern. This pattern is very difficult to implement in "Lighter". [You could tie a rubber band around the gas lever and strike the friction wheel against a wall, I suppose.] Nevertheless, "Lighter" is just as good for the programming task of lighting a cigar. "LightByStriking" is not in itself a useful effect, it is just one way of achieving something that works towards a useful effect. - Gerry Quinn |
|
#72
| |||
| |||
| In article <Pine.WNT.4.53.0411241344000.668@SLINKY>, flippa@flippac.org says... > On Wed, 24 Nov 2004, Phlip wrote: > > > > > [And by doing something, I mean 'achieving a useful effect', not > > > 'implementing a named pattern'.] > > > > Ah, yes, the possibility of Pattern Abuse is more than enough reason to > > refuse to achieve a useful effect using a named pattern. > > > I have to admit, I tend to be a little skeptical about patterns due to > examples like the Visitor pattern where half the problem is that typical > OO techniques get the dependencies backwards (the whole "pass-and-return > context while walking a graph" thing, that's fine). Mostly it just boils > down to my tending not to use pattern names to refer to things though - > there're useful patterns out there. Ones like MVC I'm even willing to use > the name for. Often they seem to be just jargonisation of the trivial. I wonder when they will be discovered by 'critical theorists'? - Gerry Quinn |
|
#73
| |||
| |||
| In article <Pine.WNT.4.53.0411241344000.668@SLINKY>, flippa@flippac.org says... > On Wed, 24 Nov 2004, Phlip wrote: > > > > > [And by doing something, I mean 'achieving a useful effect', not > > > 'implementing a named pattern'.] > > > > Ah, yes, the possibility of Pattern Abuse is more than enough reason to > > refuse to achieve a useful effect using a named pattern. > > > I have to admit, I tend to be a little skeptical about patterns due to > examples like the Visitor pattern where half the problem is that typical > OO techniques get the dependencies backwards (the whole "pass-and-return > context while walking a graph" thing, that's fine). Mostly it just boils > down to my tending not to use pattern names to refer to things though - > there're useful patterns out there. Ones like MVC I'm even willing to use > the name for. Often they seem to be just jargonisation of the trivial. I wonder when they will be discovered by 'critical theorists'? - Gerry Quinn |
|
#74
| |||
| |||
| On Thu, 25 Nov 2004, Gerry Quinn wrote: > In article <Pine.WNT.4.53.0411241344000.668@SLINKY>, flippa@flippac.org > says... > > I have to admit, I tend to be a little skeptical about patterns due to > > examples like the Visitor pattern where half the problem is that typical > > OO techniques get the dependencies backwards (the whole "pass-and-return > > context while walking a graph" thing, that's fine). Mostly it just boils > > down to my tending not to use pattern names to refer to things though - > > there're useful patterns out there. Ones like MVC I'm even willing to use > > the name for. > > Often they seem to be just jargonisation of the trivial. I wonder when > they will be discovered by 'critical theorists'? > In fairness they do tend to include the most general variant on the theme - ironically, passing a context makes rather a lot more sense to FP coders than imperative ones, a classic example being shunting an environment around an abstract syntax tree. The Observer pattern does leave me thinking "oh look, somebody reinvented interrupts!" though. I find patterns far more useful implemented as HOFs and the like. A "support for the Observer pattern" class or monad could be quite a timesaver within even one project, and I'm probably going to end up hacking one up for the IRC client I'm working on. -- flippa@flippac.org |
|
#75
| |||
| |||
| On Thu, 25 Nov 2004, Gerry Quinn wrote: > In article <Pine.WNT.4.53.0411241344000.668@SLINKY>, flippa@flippac.org > says... > > I have to admit, I tend to be a little skeptical about patterns due to > > examples like the Visitor pattern where half the problem is that typical > > OO techniques get the dependencies backwards (the whole "pass-and-return > > context while walking a graph" thing, that's fine). Mostly it just boils > > down to my tending not to use pattern names to refer to things though - > > there're useful patterns out there. Ones like MVC I'm even willing to use > > the name for. > > Often they seem to be just jargonisation of the trivial. I wonder when > they will be discovered by 'critical theorists'? > In fairness they do tend to include the most general variant on the theme - ironically, passing a context makes rather a lot more sense to FP coders than imperative ones, a classic example being shunting an environment around an abstract syntax tree. The Observer pattern does leave me thinking "oh look, somebody reinvented interrupts!" though. I find patterns far more useful implemented as HOFs and the like. A "support for the Observer pattern" class or monad could be quite a timesaver within even one project, and I'm probably going to end up hacking one up for the IRC client I'm working on. -- flippa@flippac.org |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.