develooper Front page | perl.perl6.language | Postings from July 2005

Re: Elimination of Item|Pair and Any|Junction

Thread Previous | Thread Next
Larry Wall
July 27, 2005 13:25
Re: Elimination of Item|Pair and Any|Junction
Message ID:
On Wed, Jul 27, 2005 at 12:19:10PM -0400, Matt Fowles wrote:
: While we are talking about words... I dislike having Object encompass
: Juction.  I get the feeling that some people will write functions that
: take Objects and not expect Junctions to slip in.  I suppose that
: could be one of those hurdles that developers just have to jump, but
: it doesn't feel like it should be.

In which case

    - Any
        - Object
            - Item
                - ...pretty much everything
            - Pair
        - Junction
    - num, int, str...

would be a little more like Thomas's type lattice.  (Though I expect he'd
treat the value types as constrained subtypes of Num, Int, Str, etc.)

It seems stupid to split Object into just two things.  But maybe
there are other magical beasties like Pair that go alongside Pair,
such as ordinary lazily bound argument lists before they are bound
to a particular signature, or semicolons/pipes before it's determined
if the signature is semicolon-sensitive.  Basically, anything that's
magical to the binder goes on that level, and according to the above
would be an Object but not an Item.

However we do it, we can only aim for Least Surprise, since No Surprise
is not really attainable here.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About