[swift-evolution] [Review] SE-0023 API Design Guidelines (when	to use properties)
    Dave Abrahams 
    dabrahams at apple.com
       
    Thu Jan 28 11:16:14 CST 2016
    
    
  
on Wed Jan 27 2016, Howard Lovatt <swift-evolution at swift.org> wrote:
> @David,
>
> As an aside: I think that iterator is a bad example because iterator itself
> is undefined as to whether it is single or multi pass. In Java the two
> concepts are seperate; an iterator is always multi pass and a stream is
> maybe multi pass but is treated as single pass unless you are really sure
> it is multi pass (it generates a runtime error if it is single pass and you
> attempt twice). This is probably a better approach and in Swift terms it
> would be sequence.iterator and sequence.stream() (to remind you that stream
> is probably single pass).
This actually made me wonder whether Sequence ought to be called
Stream.  Hmmm...
-- 
-Dave
    
    
More information about the swift-evolution
mailing list