Darren Duncan wrote on 2010 Jan 23:
pugs-comm...@feather.perl6.nl wrote:
Author: lwall
Date: 2010-01-23 15:43:40 +0100 (Sat, 23 Jan 2010)
New Revision: 29582
<snip>

As a follow-up to the above, I re-raised the issue on IRC today and got a response there; I've copied the most relevant portions here to help them not be forgotten.

The single most important line being:

[6:18pm] TimToady: I'm fine with Seq being considered immutable (but lazy), and adding a SeqIterator or whatever

-- Darren Duncan

--------------

[5:03pm] dduncan: TimToady, about a recent synopsis change about Seq that I commented on, do you consider that any type which is lazy must also be classified mutable?
[5:04pm] dduncan: I refer to r29582 and a Jan 23 comment on p6l
[5:21pm] pmichaud: dduncan: immutable types are allowed to do lazy evaluation
[5:21pm] dduncan: so why was Seq declared mutable then? laziness seemed the cited reason, which I disagree with [5:27pm] pmichaud: ah, I see. I didn't notice Seq being declared mutable. That surprises me a little also, but not enough to worry about it at the moment.
[5:35pm] pmichaud: oh.  Seq is listed as immutable also
[5:35pm] pmichaud: I suspect it's a typo
[5:37pm] dduncan: so it is
[5:37pm] dduncan: but r29582 definitely *added* it to Mutable
[5:37pm] dduncan: and I thought things were only supposed to be in 1 category
[5:38pm] dduncan: if Mutable and Immutable aren't mutually exclusive, that needs explaining [5:38pm] pmichaud: at the time of the change we were still (and still are) trying to work out the details of the iterator interface [5:39pm] pmichaud: so Seq in that context was (I suspect) intended to replace the previous notion we had of List [5:39pm] pmichaud: while also recognizing that lists (as iterators) are in fact mutable [5:39pm] dduncan: I can understand that respect, if some iteration on a Seq would change the results of some other iteration [5:40pm] dduncan: but then it seems better to have 2 separate types, eg a Seq and an Iterator ... and maybe you do
[5:40pm] dduncan: but the docs need cleanup
[5:40pm] pmichaud: I suspect the mutable version will get a different name
[5:40pm] dduncan: perhaps SeqIterator?
[5:41pm] pmichaud: at the momnt, the ng1 branch is using List and Iterator
[6:18pm] TimToady: I'm fine with Seq being considered immutable (but lazy), and adding a SeqIterator or whatever
[6:19pm] TimToady: can't do it myself at the moment, have to go out tonight.
[6:19pm] dduncan: thank you
[6:20pm] pmichaud: ng1 has SeqIterator :-)

Reply via email to