Patterns and Compositionality
btanksley@hifn.com
btanksley@hifn.com
Thu, 27 Jan 2000 09:07:02 -0800
Massimo, why are all your messages sent with high importance? ("X-Priority:
1" in the header.)
> From: Massimo Dentico [mailto:m.dentico@teseo.it]
> Subject: Re: Patterns and Compositionality
> Jim Little wrote:
> The context is: "[..] If generalizing a pattern is lambda-
> abstraction and inlining a pattern is beta-expansion [..]". So, I
> have rendered explicit my premises just to make feasible an
> objection to my reasoning. But the intuitive definition of pattern
> doesn't invalidate /a priori/ a more rigorous one.
Lambda calculus is not even _close_ to powerful enough to handle design
patterns -- it's not even powerful enough to easily handle function calls
when the called function is permitted to modify variables (although it is
sufficiently powerful to model either one, given some more complexity). So
you can't establish a one-to-one correspondance between operations in lambda
calculus and pattern design or use.
So far, patterns have no been successfully formalized. One reason for this
is that a true design pattern has to be commonly useful; if it's not, it may
be a clever design, but it's not suitable for a pattern.
> I suspect that Fare speaks about the "hype" (I'm not sure about
> the meaning of this word), around the useful idea of pattern,
> exactly because the lack of a precise definition prevent any
> attempt of rigorous reasoning (for example, comparisons of
> expressiveness with other frameworks).
Fare senses most strongly other's crimes when he himself is guilty of the
same thing. Hype is the entire basis of our devotion to Tunes, and Fare is
responsible for that. So hype can be used for good as well as evil ;-).
Patterns are useful. This is one of the main parts of their definition, so
they can't help it.
The patterns used in C++ are not similar to the patterns used in C, and
neither one looks like the design patterns used in Beta (although the C++
patterns are mostly useful in Beta, the other way is not true; some C++
patterns are useless in Beta because Beta can express the same concepts as
part of the language).
> Instead the problem is: the rigorous definition cathces the whole
> intuitive definition? The paper of Wegner (as I understand it)
> tries to answer this question relatively to the notion of
> computability, the intuitive compared to the formal notion. He
> suggests that Multi-Stream Interection Machines (MIMs) and
> co-inductive reasoning give a stronger model of computation
> compared to Turing Machines, lambda calculus and inductive
> reasoning.
A very interesting hypothesis. I lost the link to it, I think; or I never
read it. Where may I look?
> The intention of my original post was to highlight the fact that
> if Wegner and my equation are right then, even in the
> field of functional/logic
> programming, the formal model of reference
> (lambda calculs) doesn't catch the expressive power of this
> languages.
Which language?
Or were you trying to say that lambda calculus can't model everything a
computer can compute?
> Massimo Dentico
-Billy