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

Re: Confused about Value and Item

Thread Previous
From:
Stevan Little
Date:
March 22, 2012 15:14
Subject:
Re: Confused about Value and Item
Message ID:
BED207E3-226A-4A19-A13D-B3A5E9AA2460@iinteractive.com
Chris,

Exactly, Any is "all things" and Item is "a thing". I don't recall the details right now, but there is some Set Theory that explains it more clearly (assuming you understand set theory).

- Stevan

On Mar 22, 2012, at 5:34 PM, Chris Prather wrote:

> 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


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