Design Patterns == weakness in language

David Medlock noone at nowhere.com
Tue Sep 19 16:30:46 PDT 2006


Steve Horne wrote:
> As an out-of-order starting point...
> 
> 
>>I don't know what a 'prat' is but what you have posted is definitely 
>>prattle.  I think jumping all over me over a simple weblink is juvenile 
>>at best.
> 
> 
> For reference - a 'prat' is what I was being when I posted. It is a
> common Brit insult, and often refers to someone who irritates people
> either deliberately or by being inconsiderate.
> 
> It's mostly a mild, inoffensive thing. Something you might call a
> friend. Like the terms 'tart' and 'whore' mean similar things, but
> 'tart' is rarely offensive. People call themselves tarts in a jokey
> way, and they call themselves prats just the same.
> 
> BUT it is also used in spite, which is what I did, so I appologise for
> that.
> 
> I'm clearly in a mood where I can't post responsibly. So I think it's
> best if I go to 'lurk only' mode until I'm in a mood where I can play
> nice.
> 
> Sorry.
> 

No problem.

> That said, I still feel the need to make a few points - sorry if that
> gives the impression of a 'false' appology, but I've always felt that
> I should be able to appologise meaningfully for what I did wrong
> without that meaning I'm wrong about everything.
> 
> Your bad feeling was justified, but I can't leave what I see as a
> factually incorrect claim uncountered.
> 

I was a little miffed, mostly because I haven't seen your posts and you 
implied I was either:ignorant of patterns and/or a Lispnik.

> On Sun, 17 Sep 2006 23:33:37 -0400, David Medlock <noone at nowhere.com>
> wrote:
> 
> 
>>Well since the GOF book is the most popular book on patterns, Norvig 
>>attempted to emulate functionality in THOSE patterns.  You are laughing 
>>at your own inferences.
> 
> 
> I was responding to...
> 
> : In sufficiently powerful language design patterns seem to become 
> : unnecessary:
> : 
> : http://www.norvig.com/design-patterns/
> : 
> : -DavidM
> 
> Which was itself in response to..
> 
> : > But claiming that *all* design pattern comes from language flaws as the 
> : > author imply??
> : > 
> : > Uh? Show me the proof: big claims need strong proofs!
> 
> Basically, I still feel that it is reasonable to take your post as a
> quote and link given as proof of an opinion that you agree with.
> 

A fair assumption.  I think you inferred a bit more than that though..
Norvigs presentation shows exactly how to achieve the semantic 
functionality in dylan and Lisp.

Not only that, later in it he shows a bunch of things which are very 
difficult in C++: coroutines, multimethods and partial evaluation.

Advancing programming is all about moving to higher level in the aspects 
we can, I believe he shows some examples of this.

> Now, I'm on slightly weak ground in some respects because I haven't
> read much of the link, and made my inferences mostly from renox's
> quote. However, renox posted the quote that...
> 
> : The claim is that "16 of 23 patterns have qualitatively simpler 
> : implementation in Lisp or Dylan than in C++ for at least some uses of 
> : each pattern"
> 
> And that claim can only support the conclusion that...
> 
> : In sufficiently powerful language design patterns seem to become 
> : unnecessary:
> 

> ...if you believe that the GOF patterns are either all patterns, or at
> least a reasonable sample of relevant ones, as opposed to the biased
> sample that they clearly are since they are explicitly aimed at
> "standard OOP languages" and there are many many more patterns, both
> published and not, that are aimed at other things.
> 
> So when I posted...
> 

Well as you stated there are plenty of patterns(on C2 alone), but we 
cannot dissect them all.  As Mark Twain stated: its hard to argue with a 
good example.

> 
>>>So Lisp makes some Java patterns look a bit daft. So what? Lisp and
>>>scheme and such have their own patterns and, shock horror, many of
>>>them make no sense in Java or C++.
> 
> 
> I was overdoing the sarcasm, but I still think the underlying point
> was a reasonable reaction to what you posted.
> 

True, but the point I was making is that the problems are usually at a 
higher level in more powerful languages.

> 
>> The point (since you missed it) 
>>is that D is a successor to C++ and the OP was lamenting missing some of 
>>those patterns in D.
> 
> 
> I still don't see any example of anyone lamenting anything being
> missing in D in the chain leading back to Brads original post. I saw
> only the false suggestion that the existence of patterns indicates
> weaknesses in the language.
> 
The discussion seemed to be Design patterns applied to languages.  I 
would argue not a ton would change with D applied to those patterns. 
That is also my point though...just incurring discussion not arguments.

> 
>>>Personally, though, I think David and his references just don't know
>>>what a design pattern is.
>>
>>Spoken like a true priest of the OOP church.  I have been programming 
>>long enough and in enough paradigms to say I don't need your stamp of 
>>approval, especially for posting what I thought was an interesting link 
>>to the discussion at hand.
> 
> 
> I never criticised non-OOP languages. What I said was in support of
> patterns, and their being more widely applicable than just standard
> OOP languages.
> 
> The worst I did was (1) state that I haven't personally been able to
> get along with Lisp-alikes, and hadn't got a 'paradigm-shift' from
> them, and (2) recycle an ancient Lisp joke in a deliberately sarcastic
> point about bad advocacy.
> 

I am not a Lisp-junkie.  I see its inherent power and its weaknesses. 
Unfortunately I also see a million distributions all with quirks and the 
read-it-back issue isn't too good either.

> As I said, your post appeared to be supplying the proof that renox had
> previously demanded. No matter how many times I go back and re-examine
> it, your claim of neutrality on the issue still seems odd.
> 

I was attempting to add to the discussion, if I am not adding anything 
tell me why?  Without opposing viewpoints its basically just a pep-rally.

I am actually quite neutral.  If I had to classify my programming style 
it would be data-driven.  Just about every reusable program I have ever 
used concentrated on the data(web browser,compiler,Spreadsheet,etc). 
Lisp is good for a good number of these, python for others, D for others.

My big criticism of OOP has always been inheritance.  I have yet to see 
it applied in a large way(horizonally not vertically) and not had a huge 
mess. I prefer prototypes and delegation to inheritance.

> 
> Well, the crucifiction was put on hold, pending any future ignorant
> comments I might make. So I do try very hard not to make any. But I
> have checked back, and the terms allow that I don't have to get on
> with Lisp. Just the 'no more ignorant garbage about Lisp' clause.
> 
> So I *should* be OK ;-)
> 

Lisp is simply syntax trees, Closures,RTTI and a compile time lexical 
analyzer(aka pattern matching).  The syntax trees make it what it is, so 
you can't remove the parentheses.  The tools it provides to make data 
turn into code are fairly flexible.

In closing, sorry if my post sounded harsh, but your post sounded 
exactly like the OOP-is-the-world responses I have fielded in the past.

I am pretty even tempered usually but I program in Perl all day you see 
so I have a pretty good excuse to lose it once in a while!

Cheers,
-DavidM



More information about the Digitalmars-d mailing list