Design Patterns == weakness in language

Steve Horne stephenwantshornenospam100 at aol.com
Tue Sep 19 13:18:10 PDT 2006


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.


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.


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.

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...

> > 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.


>  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.


> > 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.

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.

Oh, and I've been programming a long time (and in multiple paradigms)
too. I do tend to turn back to more conventional OOP/imperitive for
real work, but I've got my paradigm shifts from languages like Haskell
(and Miranda, many years ago), Prolog and Icon (imperitive, but
differently imperitive) as well - all have influenced my style, and
all have influenced what I expect from a good programming language.

So much for that "true priest of the OOP church" claim.

>I doubt you even know why the parentheses even exist in Scheme or Lisp.

My knowledge of scheme and lisp is, I admit, superficial. But this was
meant to be a sarcastic point anyway, referring to a common
misrepresentation of Lisp-style languages. Repeating an ancient bad
joke to make a point about bad advocacy (and being a prat as I did
it).

As I already said, I tend to give up on Lisp-alikes soon after the
syntax-and-semantics stage when the real language learning starts. I
never seem to get to the able-to-create-real-software stage.

But that doesn't justify your implying that I'm ignorant. In fact, my
experience with Lisp reinforces my point about patterns.

To expand on the point, I know full well that you can basically define
your own syntax using a library in Lisp-alikes, and that if you do so
you can get rid of the 'infuriatingly stupid' parentheses - if you
interpret them as such. And I know also that most Lisp users choose
not to do that for the most part, since the parentheses do their job
very well - its a style like any style, with its own particular
strengths.

Fancy a parser generator? I don't think Scheme developers understand
the point of lex or yacc. "Why use a noddy little external tool?" they
ask. "Why not just use the language you're already using, and have the
full power of that language available as a bonus?"

I'm fully aware of all that. But really, the problem I have with
Lisp-alikes (or at least the main problem I had last time around the
loop, a few years back) is that there is too much freedom and too much
power.

With infinite flexibility comes infinite options. There are no
boundaries. It is hard to know where there's solid ground to build on.
It is hard to know what structure to apply. The Perl people are fond
of saying that there's more than one way to do it, but when there's no
apparent bounds to the number of ways to do it...

Well, this particular newbie gets overwhelmed, and gives up.

I had similar issues in Haskell, as it happens, but only after some
paradigms had already shifted a bit. Functional programming wasn't
entirely new to me then. I've used Miranda, but not very much and it
was a very long time ago, and let's face it - I didn't like the all
prefix notation, which just seemed like backwards Forth. Hard to get
to paradigms when the syntax is driving you nuts.

Haskells syntax, in contrast, is maybe the exemplar for
indentation-based structuring - almost a paradigm in itself. Python is
cool, but compared with the offside rule, it's just not quite there.

Anyway, a good collection of patterns for Lisp-alikes would be a great
thing, IMO. It would help newbies to get past the syntax-and-semantics
stage to the able-to-build-real-software stage. Provide a mental
vocabulary to use as a start point for creating real world designs, as
opposed to noddy textbook examples of language features.

OTOH, maybe I need to approach Lisp asking "how do I solve this
problem?" rather than "where are Lisps limits?".

Hmmmm...


Anyway, getting back to the point, there was nothing in what I posted
to prove that I'm ignorant about Lisp. To do that, you'd have to look
elsewhere...

Go to Google Groups, and seach for "steve horne lisp interpreted".

"""
It wouldn't surprise me. LISP is normally interpreted - maybe always, 
though I'm not certain of that.
"""

Lisp? Interpreted?

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 ;-)

-- 
Remove 'wants' and 'nospam' from e-mail.



More information about the Digitalmars-d mailing list