develooper Front page | perl.perl5.porters | Postings from August 2020

Re: Types in Cor (and Perl)

Thread Previous
From:
David Nicol
Date:
August 1, 2020 03:44
Subject:
Re: Types in Cor (and Perl)
Message ID:
CAFwScO9gvz3p6yuna3d3e4hpuf25RYFg5EWkHe+GEnwaCsuX7Q@mail.gmail.com
On Fri, Jul 31, 2020 at 6:52 PM Darren Duncan <darren@darrenduncan.net> wrote:

> Really we should just be stealing useful stuff from Raku here.
>
> What we want is 2 distinct categories based on classes and roles.
>
> If someone wants "any object that can stringify" then they choose the Stringy
> role as their type.
>
> If someone wants strictly the built in string type, then they choose the Str class.
>
> Its as simple as that.
>
> And I personally would want to use the strict type by default most of the time.
>
> -- Darren Duncan

Glad this is the bottom of the thread, because it's a perfect
introduction to Raku's type system which
is a very intense thing and worth leafing through just to see what
some other thoughtful committee
decided.


https://docs.raku.org/type/Any#Type_Graph


-- 
"You can be in my dream if I can be in yours." -- Bob Dylan

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