Re: Finalizing SRFI 243: Unreadable Data
Lassi Kortela 13 Jun 2023 21:32 UTC
Sorry, it's getting late...
(write '("one two")) => ("one two") ; one string
(display '("one two")) => (one two) ; two symbols
Maybe easier to understand from the Clojure example. When it reads
#object[clojure.core$_PLUS_ 0x2f40a43 "clojure.core$xxxxxx@2f40a43"]
The `#object` part is a tag, and the
[clojure.core$_PLUS_ 0x2f40a43 "clojure.core$xxxxxx@2f40a43"]
part is a normal data structure in Clojure syntax.
user=> (def it '[clojure.core$_PLUS_ 0x2f40a43
"clojure.core$xxxxxx@2f40a43"])
#'user/it
user=> (type it)
clojure.lang.PersistentVector
user=> (count it)
3
user=> (get it 0)
clojure.core$_PLUS_
user=> (get it 1)
49547843
user=> (get it 2)
"clojure.core$xxxxxx@2f40a43"
user=> (map type it)
(clojure.lang.Symbol java.lang.Long java.lang.String)