Re: Perl 6 built-in types

2006-04-28 Thread TSa
HaloO, Darren Duncan wrote: Long story shortened, if we consider the point in time where an immutable object's constructor returns as being when the object is born, then we have no problem. Any type of object is thereby immutable if it can not be changed after its constructor returns. My

Re: Perl 6 built-in types

2006-04-28 Thread TSa
HaloO, Larry Wall wrote: On Fri, Apr 28, 2006 at 04:41:41AM +, Luke Palmer wrote: : It seems like a hash whose values are the unit type. Does Perl have a : unit type? I suppose if it doesn't, we could define one: : :subtype Unit of Int where 1; : : (Assuming that where groks

Perl 6 built-in types

2006-04-27 Thread Darren Duncan
A couple of questions and suggestions about Perl 6 built-in data types, following a look at the newest S06 ( http://svn.perl.org/perl6/doc/trunk/design/syn/S06.pod ) ... 1. There doesn't seem to be an immutable bit-string type, so unless I read something wrong, I propose adding one. Since

Re: Perl 6 built-in types

2006-04-27 Thread Mark A. Biggar
How about Bag, a set container? Alternately what we really want is just a Hash where the type of the value is defined as 1, so it need not be stored at all. Then most of the syntax for it just falls out of Hash syntax, unless you like writing $x ∈ $bag instead of $bag{$x}. Presumably we

Re: Perl 6 built-in types

2006-04-27 Thread Luke Palmer
On 4/28/06, Larry Wall [EMAIL PROTECTED] wrote: How about Bag, a set container? Alternately what we really want is just a Hash where the type of the value is defined as 1, so it need not be stored at all. Then most of the syntax for it just falls out of Hash syntax, unless you like writing $x

Re: Perl 6 built-in types

2006-04-27 Thread Larry Wall
On Fri, Apr 28, 2006 at 04:41:41AM +, Luke Palmer wrote: : It seems like a hash whose values are the unit type. Does Perl have a : unit type? I suppose if it doesn't, we could define one: : :subtype Unit of Int where 1; : : (Assuming that where groks whatever when does). : : Then your

Re: Perl 6 built-in types

2006-04-27 Thread Darren Duncan
At 9:07 PM -0700 4/27/06, Mark A. Biggar wrote: I'm not sure that immutable make any sense as a concept separate from constant. A truly immutable object can't even be initialized, it has to be born ex-nilo already with a value. Well, that depends on your philosophy. I would argue that,