Hal Fulton wrote:
> dblack / wobblini.net wrote:
> >
> > I personally dislike "magic dot" stuff like that.  True, it's not
> > really magic, since map can return some kind of enumerator that knows
> > about the array and is ready to do something to it.  But it still has
> > the look and feel of a kind of secret system for communicating what's
> > wanted, rather than something that really makes sense when read left
> > to right.
> >
>
> Agreed. That is similar to the reason I hate the flip-flop
> operator (syntax, not semantics) and even worse, junctions.

I understand the general feeling you express. But is the reason really
just in the reading? I suspect there's more to it. What really lies at
the core of this uncomfortable feeling? I think maybe is has more to do
with comprehension of the general pattern. That is to ask, what is this
"magic dot" notation really? Maybe if we understood it better we would
not feel  so uncomfortable with it --or at the very least, maybe we
would truly understand why we rightly feel so.

In thinking about it, it seems to me that "magic-dotting" is simply
using a form of Object Adapter Design Pattern. (see
http://en.wikipedia.org/wiki/Adapter_pattern). I think there is a
tendency to over look this and think more in terms of retroactive
application of the subsequent method call. That means were focusing on
the ultimate action, and so it seems odd then b/c we are thinking of
'.x.y' in 'obj.x.y' as a single message when clearly we see there are
two messages actually being sent. That unsettles us. But as I suggest,
if we see it for what it really is --an adapter, then it makes perfect
sense, and doesn;t seem so magical after all (except that it still
offers some nicely terse syntax).

T.