----- Original Message ----- From: "Neil Toronto" <neil.toro...@gmail.com> To: "Sam Tobin-Hochstadt" <sa...@ccs.neu.edu> Cc: "<dev@racket-lang.org>" <dev@racket-lang.org> Sent: Wednesday, August 15, 2012 10:36:36 AM GMT -05:00 US/Canada Eastern Subject: Re: [racket-dev] Wrapping loops for TR isn't working, and the type annotations are for the wrong value
On 08/15/2012 08:05 AM, Sam Tobin-Hochstadt wrote: > On Wed, Aug 15, 2012 at 9:54 AM, Neil Toronto <neil.toro...@gmail.com> wrote: >> When #:length is given, it's similar in that it creates a vector outside the >> loop and bangs values into it. But I have to start with (define vs (vector)) >> and then (set! vs (make-vector n v)) when the first value `v' is computed. >> The docs for `for/vector' say any values not computed in the loop are >> supposed to be 0, but that doesn't work well in TR: it'd have to create a >> (Vectorof (U T 0)). Ick. > > So then the first value computed is replicated everywhere? That seems > unappealing as well. >It costs nothing, and if the #:length argument matches the number of >iterations, the user never sees it. Not so, it costs memory leaks if the first value would otherwise be garbage collected. -Ian _________________________ Racket Developers list: http://lists.racket-lang.org/dev _________________________ Racket Developers list: http://lists.racket-lang.org/dev