Re: no names allowed, we serve types only

From: Ben Finney <bignose+hates-spam_at_benfinney.id.au>
Date: Mon, 15 Feb 2010 18:24:53 +1100
Message-ID: <87r5onc662.fsf_at_benfinney.id.au>



Keith H Duggar <duggar_at_alum.mit.edu> writes:

> On Feb 14, 4:45 pm, Ben Finney <bignose+hates-s..._at_benfinney.id.au>
> wrote:
> > Okay, so the “copy type” operation yields a type that is
> > identical to the original except for its name. What problem is being
> > solved by this?
>
> It is an alternate solution to the problem of identifying attributes
> that we want to have the "same type". One solution is to introduce
> "attribute names". Another, the one I'm proposing here, is to enrich
> the type system to provide these "type copies" which are distinct but
> mutually coercible types. I believe this solution is simpler in some
> ways and that often one is already in possession of all unique types
> in which case attribute names just "get in the way" to some extent.

I don't see how it makes a useful improvement.

There needs to be a way to define attribute behaviour, and also to define them in such a way that attributes can be uniquely addressed after definition.

The current method to do this is to assign the attribute a type to implement its behaviour, and a unique name to address the attribute. Programming languages support this, to the extent that it even matches the underlying type metaphor of the programming languages themselves.

Your proposal, if I understand correctly, is that attributes would have a type that must be unique, and the unique type name would be how to address the attribute. Uniquely-named types could be identical in their behaviour. Yet there would be no widespread language support for this, so it would need to have a pretty significant *benefit* over the existing system to be worth considering.

So far, all I've seen is that it could be made equivalent to the current metaphor. You claim less complexity, but I don't see that; all you've done is shift the complexity around. I also don't see where you've made explicit what the significant benefit of this change would be.

-- 
 \      “Any intelligent fool can make things bigger and more complex… |
  `\    It takes a touch of genius – and a lot of courage – to move in |
_o__)                        the opposite direction.” —Albert Einstein |
Ben Finney
Received on Mon Feb 15 2010 - 01:24:53 CST

Original text of this message