crafted `vec' call allows created vector to be mutated
Description
While a relaxation of when different changes to the environment are made may impact the resulting value of the vector, as it is with lazy seqs, it oughtn't be possible to get two different results for the same access, just as with lazy seqs.
Environment
Found in 1.3.0; tested in 1.4.0-alpha2 as well.
Attachments
1
Activity
Andy Fingerhut April 25, 2012 at 1:42 AM
Removed non-preferred patch clj-893-doc-vec-aliases-java-array-patch2.txt of Mar 26, 2012.
Brenton Ashworth April 21, 2012 at 10:12 PM
Added patch
clj-893-doc-vec-aliases-java-array-patch3.txt
With this patch the doc string would be:
Andy Fingerhut April 14, 2012 at 10:22 PM
Would someone better at writing Clojure style doc strings take a crack at this? I'm too verbose. I have added a (verbose) note about this behavior on clojuredocs.org.
Rich Hickey April 13, 2012 at 2:09 PM
I'd prefer it said will alias and "should not be modified" vs "should be copied".
Andy Fingerhut March 26, 2012 at 11:16 PM
clj-893-doc-vec-aliases-java-array-patch2.txt of Mar 26, 2012 is shorter than the previous attempt, and avoids the error Stuart Sierra found.
While a relaxation of when different changes to the environment are made may impact the resulting value of the vector, as it is with lazy seqs, it oughtn't be possible to get two different results for the same access, just as with lazy seqs.