ClojureScript

Tagged literals should yield Java types to macros

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

user=> '#inst "2000-01-01"
#inst "2000-01-01T00:00:00.000-00:00"

ClojureScript:cljs.user> '#inst "2000-01-01"
(js/Date. 946684800000)

CLJS should return a JS Date object, not a list.

This means that there needs to be a pluggable system for emitting custom types as JS code. Right now you can work around this via (defmethod cljs.analyzer/emit-constant ...)

Full discussion in IRC here: http://clojure-log.n01se.net/date/2013-05-30.html#20:10

Activity

David Nolen made changes -
Field Original Value New Value
Description {code}
user=> '#inst "2000-01-01"
#inst "2000-01-01T00:00:00.000-00:00"

ClojureScript:cljs.user> '#inst "2000-01-01"
(js/Date. 946684800000)
{code}

CLJS should return a JS Date object, not a list.

This means that there needs to be a pluggable system for emitting custom types as JS code. Right now you can work around this via (defmethod cljs.analyzer/emit-constant ...)

Full discussion in IRC here: http://clojure-log.n01se.net/date/2013-05-30.html
{code}
user=> '#inst "2000-01-01"
#inst "2000-01-01T00:00:00.000-00:00"

ClojureScript:cljs.user> '#inst "2000-01-01"
(js/Date. 946684800000)
{code}

CLJS should return a JS Date object, not a list.

This means that there needs to be a pluggable system for emitting custom types as JS code. Right now you can work around this via (defmethod cljs.analyzer/emit-constant ...)

Full discussion in IRC here: http://clojure-log.n01se.net/date/2013-05-30.html#20:10
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: