Details

    • Type: New Feature
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects versions: Release 1.6
    • Fix versions: None
    • Labels:
    • Approval:
      Triaged
    • Patch:
      Code and Test

      Description

      Whereas

      • clojure.core/read and clojure.edn/read require a PushbackReader;
      • clojure.java.io/reader produces a BufferedReader, which isn't compatible;
      • the hazard has tripped folks up for years[1];
      • clojure.java.io is pure sugar anyway (and would not be damaged by the addition of a little bit more);
      • clojure.java.io's very existence suggests suitability and fitness for use (wherein by the absence of a read-compatible pushback-reader it falls short);

      i.e., in the total absence of clojure.java.io it would not seem "hard" to use clojure.edn, but in the presence of clojure.java.io and its "reader" function, amidst so much else in the API that does fit together, one keeps thinking one is doing it wrong;

      and

      • revising the "read" functions to make their own Pushback was considered but rejected [2];

      Therefore let it be suggested to add clojure.java.io/pushback-reader, returning something consumable by clojure.core/read and clojure.edn/read.

      [1] The matter was discussed on Google Groups:

      (2014, "clojure.edn won't accept clojure.java.io/reader?") https://groups.google.com/forum/#!topic/clojure/3HSoA12v5nc

      with a reference to an earlier thread

      (2009, "Reading... from a reader") https://groups.google.com/forum/#!topic/clojure/_tuypjr2M_A

      [2] CLJ-82 Closed and the 2009 message thread

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              9 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: