On Feb 20, 2009, at 12:58 PM, Perry Trolard wrote:
Hope I didn't imply by the above that I was suggesting a name change. I know my proposed version is ugly, but since BufferedReader & LineNumberingPR can't be unified, special-case-ing for the latter strikes me as an acceptable fix. But removing the type hint so that the function works out of the box is the next best option. (I know the above microbenchmarking is dubious & smacks of premature optimization, especially for a function whose use case, at least for me, is command-line interaction -- which is not performance-critical. But then I thought about reading strings from stdin, which could be; but perhaps a (line-seq) on a wrapped System/in would be better anyway...)
Hi Perry,I think clojure.core/read-line should accept the default value of *in* as a suitable provider of lines via "readLine" calls.
It should work. It used to work. It doesn't work now. I consider that a bug.
I like the fix you've proposed that specifically allows LineNumberingPushbackReader as a type for the argument. I think removing the hint is also a good fix, but runs against an apparent desire to remove reflection from clojure.core as much as possible.
Good luck, --Steve
smime.p7s
Description: S/MIME cryptographic signature