Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
We need a "immutable list" type (Parcel?)
Note that we're likely to need a separate type to represent
immutable lists, and which will be produced using infix:<,> .
The naming is open for discussion/bikeshedding.
  • Loading branch information
pmichaud committed Jun 23, 2015
1 parent 2991e87 commit bce89a3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion S07-glr-draft.pod
Expand Up @@ -160,7 +160,20 @@ parenthesized comma lists react to things like C<.elems> and C<.[]>.

(1, (2, 3)).elems # (pre-GLR) 3; (post-GLR) 2
(1, 2, 3..7).elems # (pre-GLR) 7; (post-GLR) 3


Update 2015-06-22: Okay, I'm no longer certain that C<Parcel> is
disappearing. We really need two types here; one (base) type that
represents immutable lists, and another type that represents mutable
lists. The C<< infix:<,> >> operator would produce the immutable type.

So, one possibility is to have C<Parcel> as a base class with C<List>
as a derived class; another possibility is to have C<List> as the
(immutable) base class and introduce another name for the mutable one.
I suspect that the immutable form is the one that occurs most commonly,
so there's an argument to be made that it should be called C<List>.

C<Seq> might be another candidate name.

=item *

The C<for> statement will no longer flatten the value provided to it.
Expand Down

0 comments on commit bce89a3

Please sign in to comment.