Permalink
Browse files

get rid of Container fossil

  • Loading branch information...
1 parent 9abc8f2 commit 0ebf6ac36f6efae9ecd931f2bccfcf76991dfd2c @moritz moritz committed Jul 4, 2012
Showing with 13 additions and 17 deletions.
  1. +9 −9 S10-packages.pod
  2. +4 −8 S32-setting-library/Containers.pod
View
18 S10-packages.pod
@@ -156,7 +156,7 @@ However, Perl 5's C<AUTOLOAD> is being superseded by MMD autoloaders
that distinguish declaration from definition, but are not restricted
to declaring subs. A run-time declarator multisub is declared as:
- multi CANDO ( MyPackage, $type, $name, *%args --> Container)
+ multi CANDO ( MyPackage, $type, $name, *%args)
which stands in for the declaration of a container object within
another container object; it is called when anyone is searching for
@@ -168,10 +168,10 @@ of object is expected in context, or this may be intuited from the
name requested. In any case, there may be multiple C<CANDO> routines
that are dispatched via MMD:
- multi CANDO ( MyPackage, Item, $name, *%args --> Container)
- multi CANDO ( MyPackage, Array, $name, *%args --> Container)
- multi CANDO ( MyPackage, Hash, $name, *%args --> Container)
- multi CANDO ( MyPackage, Code, $name, *%args --> Container)
+ multi CANDO ( MyPackage, Item, $name, *%args)
+ multi CANDO ( MyPackage, Array, $name, *%args)
+ multi CANDO ( MyPackage, Hash, $name, *%args)
+ multi CANDO ( MyPackage, Code, $name, *%args)
The package itself is just passed as the first argument, since it's
the container object. Subsequent arguments identify the desired type
@@ -182,8 +182,8 @@ Nor does it include the type information of a Code object's "long
name"; this information comes in via the type parameter, and may be
matched against using ordinary subsignature matching:
- multi CANDO ( MyPackage, &:($), $name, *%args --> Container) # 1 arg
- multi CANDO ( MyPackage, &:($,$), $name, *%args --> Container) # 2 args
+ multi CANDO ( MyPackage, &:($), $name, *%args) # 1 arg
+ multi CANDO ( MyPackage, &:($,$), $name, *%args) # 2 args
The slurpy C<%args> hash is likely to be empty in standard Perl 6
usage, but it's possible that some dialects of Perl will desire
@@ -209,9 +209,9 @@ of a proxy object can supply either readonly or rw semantics later.
When the package in question is a class, it is also possible to declare
real methods or submethods:
- multi method CANDO ($self: Code, $name, *%args --> Container)
+ multi method CANDO ($self: Code, $name, *%args)
- multi submethod CANDO ($self: Item, $name, *%args --> Container)
+ multi submethod CANDO ($self: Item, $name, *%args)
The method form is inherited by subclasses. Submethods are never
inherited but may still do MMD within the class. (Ordinary multisubs
View
12 S32-setting-library/Containers.pod
@@ -43,10 +43,6 @@ The C<Positional> role implies the ability to support C<< postcircumfix:<[ ]> >>
The C<Associative> role implies the ability to support C<< postcircumfix:<{ }> >>.
-=head2 Container
-
- role Container {...}
-
=over
=item cat
@@ -118,9 +114,9 @@ In lol context a list of C<List> is returned instead of a flat list.
=head2 List
-The following are defined in the C<List> role/class:
+The following are defined in the C<List> class:
- role List does Container {...}
+ class List does Positional {...}
=over
@@ -767,9 +763,9 @@ Note that C<kv @array> returns the same as C<zip(^@array; @array)>
=head2 Hash
-The following are defined in the C<Hash> role.
+The following are defined in the C<Hash> close.
- role Hash does Container does Associative {...}
+ class Hash is EnumMap {...}
=over 4

0 comments on commit 0ebf6ac

Please sign in to comment.