On Thu, Aug 11, 2005 at 01:35:14AM +0800, Autrijus Tang wrote:
> On Wed, Aug 10, 2005 at 07:32:01PM +0200, TSa wrote:
> > you wrote:
> > >Perl 6 in its unannotated form is also (mostly) a typeless languages,
> > >with only the five builtin types, much like Perl 5 is.
> > Counting the sigil quadriga as 4, what is the fifth element?
> & @ $ % ::
> In Perl5, :: is replaced by *.
Strictly in Perl 5 there are 7 types
SCALAR, ARRAY, HASH, CODE, GLOB, FORMAT and IO.
(where IO might actually be 2 types, file handles and directory handles,
and in turn FORMAT is implemented as a subtype of CODE.
Also, internally there are 16 variants of SV*, with mostly a 1 to 1 mapping
for all the types except SCALAR, which sort of absorbs the other 10. Except
that the null SV type is easily directly morphable into any of the others.
Mmm. I guess this about sums up Perl 5 - ultimately it's defined by the
implementation in the C source. (IIRC first remarked on by Chip))