develooper Front page | perl.moose | Postings from March 2012

Re: Confused about Value and Item

Thread Previous | Thread Next
From:
Chris Prather
Date:
March 22, 2012 14:34
Subject:
Re: Confused about Value and Item
Message ID:
CAEFJ169aK9qTafy=P8sUc3QXTW-5=DWt22f1eLf6vxW1pXOpyg@mail.gmail.com
On Thu, Mar 22, 2012 at 5:16 PM, Ricardo Signes
<perl.moose@rjbs.manxome.org> wrote:
> * Ovid <publiustemp-catalyst@yahoo.com> [2012-03-22T17:08:31]
>> In trying to explain this, I got stuck on "Item" and "Value". I have the
>> following note about them:
>
> We discussed this briefly on Twitter.  For the record, it was around
>
>  https://twitter.com/ovidperl/status/182936878192934912
>
>> A word about the types in Moose::Util::TypeConstraints. "Any" means "anything"
>> (duh). An "Item" is the same as "Any" and in your author's consultation with
>> Moose experts, there was confusion expressed as to why these were different
>
> My guess is that it's vestigal from some concept of validating non-scalars.
> But I don't know.  "It never comes up."
>

If I recall the conversation I had with Stevan about it years ago (and
several I've seen with @larry on the perl6 side) the logic here is
semantic rather than syntactic. 'Any' is a catchall ... in Perl6 it's
called Mu now from the Zen Koan idea of un-asking the question of
"What type is this?". With that frame then the idea of "Something"
rather than "Anything" is captured in the type of 'Item'.

But yeah what Ric said. "It never comes up."

-Chris

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About