[plt-dev] is there some reason that port->lines et al. don't close input port?

From: John Clements (clements at brinckerhoff.org)
Date: Mon May 24 14:12:56 EDT 2010

Is there a good reason why port->lines doesn't close the input port?  E.G. the program below, which dies at i=240 without the close-input-port? Perhaps there could be an optional argument that allowed this behavior?

John


#lang racket

(require net/url)

(for ([i (in-range 500)])
  (printf "~s\n" i)
  (let ([p (get-pure-port (string->url "http://www.google.com"))])
    (port->lines p)
    #;(close-input-port p)))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4669 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20100524/7c52cc1f/attachment.p7s>

Posted on the dev mailing list.