Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quoted list and list function produce different types #470

Open
jmglov opened this issue Dec 9, 2015 · 1 comment
Open

Quoted list and list function produce different types #470

jmglov opened this issue Dec 9, 2015 · 1 comment

Comments

@jmglov
Copy link
Contributor

jmglov commented Dec 9, 2015

I'm not sure if this is by design or by accident, but quoted lists and lists produced by the list function have different types:

user => (type '(1 2 3))
pixie.stdlib.Cons
user => (type (list 1 2 3))
pixie.stdlib.PersistentList

Furthermore, @thomasmulvaney has noticed that in compiled code, '(1 2 3) does become an instance of pixie.stdlib.PersistentList.

Empty lists, on the other hand, are equivalent:

user => (type '())
pixie.stdlib.EmptyList
user => (type ())
pixie.stdlib.EmptyList

It seems to me that we should normalise this behaviour, unless there is a good design reason for not doing so. @halgari, do you have any thoughts on this?

@thomasmulvaney
Copy link
Member

It looks like things might be muddled up. In pixie using a backtick (type```(1 2 3)) creates a PersistentList, but in clojure that makes a Cons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants