Skip to content

Commit 0ebf6ac

Browse files
committed
get rid of Container fossil
1 parent 9abc8f2 commit 0ebf6ac

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

S10-packages.pod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ However, Perl 5's C<AUTOLOAD> is being superseded by MMD autoloaders
156156
that distinguish declaration from definition, but are not restricted
157157
to declaring subs. A run-time declarator multisub is declared as:
158158

159-
multi CANDO ( MyPackage, $type, $name, *%args --> Container)
159+
multi CANDO ( MyPackage, $type, $name, *%args)
160160

161161
which stands in for the declaration of a container object within
162162
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
168168
name requested. In any case, there may be multiple C<CANDO> routines
169169
that are dispatched via MMD:
170170

171-
multi CANDO ( MyPackage, Item, $name, *%args --> Container)
172-
multi CANDO ( MyPackage, Array, $name, *%args --> Container)
173-
multi CANDO ( MyPackage, Hash, $name, *%args --> Container)
174-
multi CANDO ( MyPackage, Code, $name, *%args --> Container)
171+
multi CANDO ( MyPackage, Item, $name, *%args)
172+
multi CANDO ( MyPackage, Array, $name, *%args)
173+
multi CANDO ( MyPackage, Hash, $name, *%args)
174+
multi CANDO ( MyPackage, Code, $name, *%args)
175175

176176
The package itself is just passed as the first argument, since it's
177177
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
182182
name"; this information comes in via the type parameter, and may be
183183
matched against using ordinary subsignature matching:
184184

185-
multi CANDO ( MyPackage, &:($), $name, *%args --> Container) # 1 arg
186-
multi CANDO ( MyPackage, &:($,$), $name, *%args --> Container) # 2 args
185+
multi CANDO ( MyPackage, &:($), $name, *%args) # 1 arg
186+
multi CANDO ( MyPackage, &:($,$), $name, *%args) # 2 args
187187

188188
The slurpy C<%args> hash is likely to be empty in standard Perl 6
189189
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.
209209
When the package in question is a class, it is also possible to declare
210210
real methods or submethods:
211211

212-
multi method CANDO ($self: Code, $name, *%args --> Container)
212+
multi method CANDO ($self: Code, $name, *%args)
213213

214-
multi submethod CANDO ($self: Item, $name, *%args --> Container)
214+
multi submethod CANDO ($self: Item, $name, *%args)
215215

216216
The method form is inherited by subclasses. Submethods are never
217217
inherited but may still do MMD within the class. (Ordinary multisubs

S32-setting-library/Containers.pod

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ The C<Positional> role implies the ability to support C<< postcircumfix:<[ ]> >>
4343

4444
The C<Associative> role implies the ability to support C<< postcircumfix:<{ }> >>.
4545

46-
=head2 Container
47-
48-
role Container {...}
49-
5046
=over
5147

5248
=item cat
@@ -118,9 +114,9 @@ In lol context a list of C<List> is returned instead of a flat list.
118114

119115
=head2 List
120116

121-
The following are defined in the C<List> role/class:
117+
The following are defined in the C<List> class:
122118

123-
role List does Container {...}
119+
class List does Positional {...}
124120

125121
=over
126122

@@ -767,9 +763,9 @@ Note that C<kv @array> returns the same as C<zip(^@array; @array)>
767763

768764
=head2 Hash
769765

770-
The following are defined in the C<Hash> role.
766+
The following are defined in the C<Hash> close.
771767

772-
role Hash does Container does Associative {...}
768+
class Hash is EnumMap {...}
773769

774770
=over 4
775771

0 commit comments

Comments
 (0)