Clojure

allow for `{~@foo} and `#{~(gensym) ~(gensym)}

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

Currently both `{@foo} and `#{(gensym) ~(gensym)} throw an exception at read time even though they could actually return valid run-time code.
This patch introduces the SyntaxQuotedMap and SyntaxQuotedSet classes that are used internally in the reader to represent syntax quoted maps and sets, that may skip the duplicate key and length checks.

The SyntaxQuotedMap extends PersistentArrayMap as a workaround for the lack of defrecords in java, since a SyntaxQuotedMap needs to be an IPersistentMap in case it's used as metadata.

Activity

Hide
Nicola Mometto added a comment -

Duplicated of http://dev.clojure.org/jira/browse/CLJ-1425
Also I no longer think this is a good idea

Show
Nicola Mometto added a comment - Duplicated of http://dev.clojure.org/jira/browse/CLJ-1425 Also I no longer think this is a good idea

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: