Front page | perl.perl6.language |
Postings from March 2006
[svn:perl6-synopsis] r8504 - doc/trunk/design/syn
Thread Next
From:
autrijus
Date:
March 31, 2006 04:07
Subject:
[svn:perl6-synopsis] r8504 - doc/trunk/design/syn
Message ID:
20060331120741.AAB28CBA47@x12.develooper.com
Author: autrijus
Date: Fri Mar 31 04:07:40 2006
New Revision: 8504
Modified:
doc/trunk/design/syn/S06.pod
Log:
* S06: Updated built-in classes:
- bring in "uint" from S09 (boxes to Int)
- new "Buf" class to represent subscriptable byte streams
- "Arguments" and "Signature" from S02
- explicit "Scalar" container type from other places in S06
Modified: doc/trunk/design/syn/S06.pod
==============================================================================
--- doc/trunk/design/syn/S06.pod (original)
+++ doc/trunk/design/syn/S06.pod Fri Mar 31 04:07:40 2006
@@ -1242,44 +1242,55 @@
Note that placeholder variables syntactically cannot have type constraints.
-=head1 Types
+=head1 Built-in Types
These are some of the standard type names in Perl 6 (at least this week):
+=head2 Native types
+
bit single native bit
- int native integer
- buf native 8-bit string (sequence of 8-bit integers, no Unicode)
- str native string (sequence of arbitrary integers, no Unicode)
+ int native signed integer
+ uint native unsigned integer (autoboxes to Int)
+ buf native bytes (finite sequence of "uint8"s, no Unicode)
+ str native string (finite sequence of native integers, no Unicode)
num native floating point
complex native complex number
- ref native pointer
bool native boolean
+
+=head2 Immutable types
+
Bit Perl single bit (allows traits, aliasing, undef, etc.)
- Int Perl integer (allows traits, aliasing, undef, etc.)
- Str Perl string (Unicode semantics)
+ Int Perl integer (allows Inf/NaN, arbitrary precision, etc.)
+ Buf Perl buffer (possibly lazy list of bytes, can be subscripted)
+ Str Perl string (finite sequence of Unicode characters)
Num Perl number
Complex Perl complex number
Bool Perl boolean
+ Code Base class for all executable objects
+ Block Base class for all embedded executable objects
+ List Lazy Perl list
+ Tuple Completely evaluated (hence immutable) list
+ Signature Function parameters (left-hand side of a binding)
+ Arguments Function call arguments (right-hand side of a binding)
+
+=head2 Mutable types
+
Array Perl array
Hash Perl hash
+ Scalar Perl scalar
IO Perl filehandle
- Code Base class for all executable objects
Routine Base class for all nameable executable objects
Sub Perl subroutine
Method Perl method
Submethod Perl subroutine acting like a method
Macro Perl compile-time subroutine
Rule Perl pattern
- Block Base class for all embedded executable objects
Package Perl 5 compatible namespace
Module Perl 6 standard namespace
Class Perl 6 standard class namespace
Role Perl 6 standard generic interface/implementation
Object Perl 6 object
Grammar Perl 6 pattern matching namespace
- List Lazy Perl list
- Tuple Completely evaluated (hence immutable) list
-
=head2 Value types
@@ -1784,7 +1795,7 @@
=head2 Wrapping
-Every subroutine has a C<.wrap> method. This method expects a single
+Every C<Routine> object has a C<.wrap> method. This method expects a single
argument consisting of a block, closure, or subroutine. That argument
must contain a call to the special C<call> function:
@@ -1860,7 +1871,7 @@
=head2 Currying
-Every subroutine has an C<.assuming> method. This method does a partial
+Every C<Code> object has an C<.assuming> method. This method does a partial
binding of a set of arguments to a signature and returns a new function
that takes only the remaining arguments.
Thread Next
-
[svn:perl6-synopsis] r8504 - doc/trunk/design/syn
by autrijus