# Copyright (C) 2001-2008, The Perl Foundation.
# $Id: /mirror/trunk/docs/pdds/draft/pdd04_datatypes.pod 31054 2008-09-12T13:18:26.499180Z rurban  $

=head1 NAME

docs/pdds/pdd04_datatypes.pod - Parrot's internal data types

=head1 ABSTRACT

This PDD describes Parrot's internal data types.

{{ NOTE: this is a good overview, but we need more complete
specifications of the behavior of the datatypes. }}

=head1 DESCRIPTION

This PDD details the basic datatypes that the Parrot core knows how to deal
with. Three of these (the integer, floating point and string datatypes)  have
no additional semantics. The fourth datatype, the Parrot Magic Cookie (PMC)
acts as the basis for all high level languages running on top of  Parrot; only
the most basic aspects are described here.

Note that PMC and string internals are volatile and may be changed in the
future (although this will become increasingly unlikely as we near v1.0).
Access from external code to the internals of particular datatypes should be
via the extension mechanism (see F<docs/pdds/pdd11_extending.pod>,  which has
more explicit guarantees of stability.

=head1 IMPLEMENTATION

=head2 Integer data types

Integer data types are generically referred to as C<INT>s.  These are whatever
size native integer was chosen at Parrot configuration time. The C-level
typedefs C<INTVAL> and C<UINTVAL> get you a platform-native signed and
unsigned integer respectively.

=head2 Floating point data types

Floating point data types are generically referred to as C<NUM>s.  These are
whatever size float was chosen when parrot was configured. The C level typedef
C<FLOATVAL> will get you one of these.


=head1 ATTACHMENTS

None.

=head1 REFERENCES

The perl modules Math::BigInt and Math::BigFloat. Alex Gough's suggestions for
bigint/bignum implementation, outlined in F<docs/pdds/pdd14_bignum.pod>. The
Unicode standard at L<http://www.unicode.org>.

=head1 GLOSSARY

=over 4

=item Type

Type refers to a basic Parrot data type. There are four such: integers,
floating point numbers (often just numbers), strings and Parrot Magic Cookies
(PMCs).

=back

=head1 VERSION

1.4

=head2 CURRENT

     Maintainer: Dan Sugalski <dan@sidhe.org>
     Class: Internals
     PDD Number: 4
     Version: 1.5
     Status: Developing
     Last Modified: 11 June 2005
     PDD Format: 1
     Language: English

=head2 HISTORY

=over 4

=item Version 1.5, 11 June 2005

=item Version 1.4, 20 February 2004

=item Version 1.3, 2 July 2001

=item Version 1.2, 2 July 2001

=item Version 1.1, 2 March 2001

=item Version 1, 1 March 2001

=back

=head1 CHANGES

=over 4

=item Version 1.5

Removed BigInt and BigNum from the definition of I* and N* registers --
according to Leo they are now always PMCs, never register types of their own.

=item Version 1.4

Document basic PMC internals. Make clear the fact that the bigint/bignum
description is still provisional. Other minor fixups to make the documentation
match reality.

=item Version 1.3

Fixed some silly typos and dropped phrases.

Took all the underscores out of the field names.

=item Version 1.2

The string header format has changed some to allow for type tagging. The flags
information for strings has changed as well.

=item Version 1.1

INT and NUM are now concepts rather than data structures, as making them data
structures was a Bad Idea.

=item Version 1

None. First version

=back

=cut

__END__
Local Variables:
  fill-column:78
End:
vim: expandtab shiftwidth=4:
