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

Expr should use quotable symbols only #2389

Closed
stevengj opened this issue Feb 23, 2013 · 2 comments
Closed

Expr should use quotable symbols only #2389

stevengj opened this issue Feb 23, 2013 · 2 comments
Labels
breaking This change will break code needs decision A decision on this change is needed

Comments

@stevengj
Copy link
Member

Currently, Expr sometimes requires LISPy symbols that are not quotable in Julia, e.g.:

julia> :((Int=>Symbol)[1 => :ok, 2=>:no])
:($(expr(:typed-dict, :(Int=>Symbol), :(1=>:ok), :(2=>:no)))) 

That means that one needs to use expr(symbol("typed-dict"), ...) or similar escaping mechanisms to form such expressions manually (e.g. in macros). It would be desirable to use quotable identifiers (e.g. :typed_dict) in such cases instead.

Other examples include :typed-dict-comprehension, :dict-comprehension, and :typed-comprehension. I'm not sure if there are any others.

For backwards compatibility, I suppose one could allow either the hyphenated form or the underscored form (but use the latter by default).

@mlubin
Copy link
Member

mlubin commented Feb 23, 2013

+1. Backward compatibility may not be so important for this if it goes into 0.2.

@JeffBezanson
Copy link
Member

Agree.

JeffBezanson added a commit that referenced this issue Feb 23, 2013
rename typed-dict -> typed_dict etc. in expressions (fixes #2389)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This change will break code needs decision A decision on this change is needed
Projects
None yet
Development

No branches or pull requests

3 participants