I couldn't write an example that is not obvious, but this programs
looks ok to me:
;---
#lang racket
(define (display-vector v)
(for ([x (in-vector v 0 (vector-length v))])
(display x)))
(display-vector (vector 1 2 3))
(newline)
(display-vector (vector))
(newline)
;---
And I also like (in-
On Tuesday, January 19, 2016, Stephen Chang wrote:
> > I think you should not change this backwards compatibility unless you
> > really know it isn't used (and even then it is hard to know such
> > things).
>
> Well I still think these programs would be relying on a bug, since
> they are referenc
> I think you should not change this backwards compatibility unless you
> really know it isn't used (and even then it is hard to know such
> things).
Well I still think these programs would be relying on a bug, since
they are referencing a non-existent vector element.
But since there's no agreeme
I think you should not change this backwards compatibility unless you
really know it isn't used (and even then it is hard to know such
things).
Robby
On Tue, Jan 19, 2016 at 1:16 PM, Stephen Chang wrote:
> Yes, or course it's possible, at the expense of more unreadable code.
>
> But the zero spe
Yes, or course it's possible, at the expense of more unreadable code.
But the zero special case doesnt make sense. And is inconsistent with
other out-of-range cases, eg (in-vector (vector) 1 1) errors
To be clear, empty traversals with valid indices would still be legal,
eg (in-vector (vector 1 2
Would it be possible to special-case `(in-vector (vector) 0 0)`
directly, and fix the bug while keeping backwards compatibility?
Vincent
On Tue, 19 Jan 2016 12:19:12 -0600,
Stephen Chang wrote:
>
> I'm fixing pr 15227 but I would like to do so in a backwards-incompatible way.
>
> Right now an
I'm fixing pr 15227 but I would like to do so in a backwards-incompatible way.
Right now an out-of-range index is sometimes allowed as an argument to
in-vector, leading to the bug:
$ racket
Welcome to Racket v6.4.0.4.
-> (for/sum ([x (in-vector (vector 10 20) 2 -1 -1)]) x)
SIGSEGV MAPERR si_code
7 matches
Mail list logo