`format` behavior on Clojure vs CLJS

65 views
Skip to first unread message

Shantanu Kumar

unread,
Aug 29, 2012, 1:38:25 AM8/29/12
to Clojure
Hi,

I noticed that on the Clojure REPL, `format` works fine:

user=> (format "foo%s" :s)
"foo:s"
user=> (format "foo%s" 's)
"foos"

However, on the CLJS REPL (Rhino), I get this:

ClojureScript:cljs.user> (format "foo%s" :s)
"foo���'s"
ClojureScript:cljs.user> (format "foo%s" 's)
"foo���'s"

Wanted to first confirm this is a bug before filing a ticket.

Shantanu

Moritz Ulrich

unread,
Aug 29, 2012, 7:07:34 AM8/29/12
to clo...@googlegroups.com
This seems like a bug to me. It's caused by an implementation detail of
ClojureScript (keywords and symbols are string starting with a specific
UTF8 byte sequence).

--
Moritz Ulrich

David Nolen

unread,
Aug 29, 2012, 10:03:50 AM8/29/12
to clo...@googlegroups.com
Yep, a bug.

Shantanu Kumar

unread,
Aug 29, 2012, 10:42:53 AM8/29/12
to Clojure
OK, I filed the bug: http://dev.clojure.org/jira/browse/CLJS-363

Screwed up the formatting though, and seems I can't edit the issue
anymore.

Shantanu
Reply all
Reply to author
Forward
0 new messages