Implement reader literal and print support for PersistentQueue data structure

Description

Clojure's PersistentQueue structure has been in the language for quite some time now and has found its way into a fair share of codebases. However, the creation of queues is a two step operation often of the form:

A better experience might be the following:

This syntax is proposed and discussed in the Clojure-dev group at https://groups.google.com/forum/?fromgroups#!topic/clojure-dev/GQqus5Wycno

Open question: Should the queue literal's arguments eval? The implications of this are illustrated below:

The answer to this open question will determine the implementation.

Environment

None

Attachments

3

Activity

Show:

Alex MillerAugust 23, 2013 at 4:38 AM

Moving back to Triaged as Rich has not vetted.

Steve MinerApril 6, 2013 at 2:07 PM

Related to CLJ-1078.

Andy FingerhutOctober 20, 2012 at 6:26 PM

Fogus, with the recent commit of a patch for CLJ-1070, my touched-up patch clj-976-queue-literal-eval-and-synquote-patch-v3.txt dated Oct 16 2012 doesn't apply cleanly. In this case it isn't simply a few lines of context that have changed, it is the interfaces that PersistentQueue implements have been changed. It might be best if you take a look at the latest code and the patch and consider how it should be updated.

Andy FingerhutOctober 16, 2012 at 6:20 PM

clj-976-queue-literal-eval-and-synquote-patch-v3.txt dated oct 16 2012 is identical to Fogus's patch CLJ-976-queue-literal-eval-and-synquote.diff dated Jul 20 2012. It simply removes one line addition to clojure.iml that Rich has since added in a different commit, so that this patch now applies cleanly to latest master.

Andy FingerhutOctober 5, 2012 at 1:49 PM

clj-976-queue-literal-eval-and-synquote-patch-v2.txt dated Oct 5 2012 is identical to Fogus's patch CLJ-976-queue-literal-eval-and-synquote.diff dated Jul 20 2012. It simply removes one line addition to clojure.iml that Rich has since added in a different commit, so that this patch now applies cleanly to latest master.

Details

Assignee

Reporter

Patch

Code and Test

Priority

Affects versions

Created April 27, 2012 at 3:31 PM
Updated May 15, 2017 at 9:26 PM