Clojure

Add List and Collection support to Vec

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.2
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/269 Attachments: 0001-gvec-implement-Iterable-j.u.Collection-and-j.u.Li.patch - https://www.assembla.com/spaces/clojure/documents/b_GjzsgfOr36H0eJe5aVNr/download/b_GjzsgfOr36H0eJe5aVNr
Hide
Assembla Importer added a comment -

richhickey said: Parent association with ticket #264 was added

Show
Assembla Importer added a comment - richhickey said: Parent association with ticket #264 was added
Hide
Assembla Importer added a comment -

chouser@n01se.net said: [file:b_GjzsgfOr36H0eJe5aVNr]: gvec: implement Iterable, j.u.Collection, and j.u.List

Show
Assembla Importer added a comment - chouser@n01se.net said: [file:b_GjzsgfOr36H0eJe5aVNr]: gvec: implement Iterable, j.u.Collection, and j.u.List
Hide
Assembla Importer added a comment -

chouser@n01se.net said: Nothing dramatic in the attached patch. A couple things I was unsure about:

1. There are a couple places where walking through part or all of the vector is done by incrementing an index and calling .nth each time. Is it worth while to instead use a chunked seq of the vector?

2. In a couple other places I use the seq library: some and every? Neither of these use chunks. Is this acceptable? If not, would it be acceptable if those fns used chunks?

3. Why oh why are Iterator and ListIterator such terrible APIs? Ok, I'm not really unsure about that one...

--Chouser

Show
Assembla Importer added a comment - chouser@n01se.net said: Nothing dramatic in the attached patch. A couple things I was unsure about: 1. There are a couple places where walking through part or all of the vector is done by incrementing an index and calling .nth each time. Is it worth while to instead use a chunked seq of the vector? 2. In a couple other places I use the seq library: some and every? Neither of these use chunks. Is this acceptable? If not, would it be acceptable if those fns used chunks? 3. Why oh why are Iterator and ListIterator such terrible APIs? Ok, I'm not really unsure about that one... --Chouser
Hide
Assembla Importer added a comment -

chouser@n01se.net said: Oh, one more:

4. I used subvec on a gvec to implement subList. It seems to work fine since APersistentVector.SubVector just requires the underlying object to be an IPersistentVector, which of course gvecs are. This is ok?

Show
Assembla Importer added a comment - chouser@n01se.net said: Oh, one more: 4. I used subvec on a gvec to implement subList. It seems to work fine since APersistentVector.SubVector just requires the underlying object to be an IPersistentVector, which of course gvecs are. This is ok?
Hide
Assembla Importer added a comment -

richhickey said: This all seems ok as a first cut. I wouldn't do anything with chunks in here right now. subvec seems ok. some/every? we might reconsider at some point due to bootstrapping. But that is an implementation detail

Show
Assembla Importer added a comment - richhickey said: This all seems ok as a first cut. I wouldn't do anything with chunks in here right now. subvec seems ok. some/every? we might reconsider at some point due to bootstrapping. But that is an implementation detail
Hide
Assembla Importer added a comment -

chouser@n01se.net said: (In [[r:df17f32858eb0b700d21a2a2364a54596f139e89]]) gvec: implement Iterable, j.u.Collection, and j.u.List Fixes #268 and #269

Signed-off-by: Rich Hickey <richhickey@gmail.com>

Branch: master

Show
Assembla Importer added a comment - chouser@n01se.net said: (In [[r:df17f32858eb0b700d21a2a2364a54596f139e89]]) gvec: implement Iterable, j.u.Collection, and j.u.List Fixes #268 and #269 Signed-off-by: Rich Hickey <richhickey@gmail.com> Branch: master

People

  • Assignee:
    Chouser
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: