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

Add #: for Clojure. #642

Closed
ghost opened this issue Aug 22, 2018 · 5 comments
Closed

Add #: for Clojure. #642

ghost opened this issue Aug 22, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Aug 22, 2018

No description provided.

@tonsky
Copy link
Owner

tonsky commented Aug 23, 2018

What does it do?

@ghost
Copy link
Author

ghost commented Aug 23, 2018

An easier way to declare object-like maps. An example is here:

#:person{:first "Han"
         :last "Solo"
         :ship #:ship{:name "Millennium Falcon"
                      :model "YT-1300f light freighter"}}

is read as:

{:person/first "Han"
 :person/last "Solo"
 :person/ship {:ship/name "Millennium Falcon"
               :ship/model "YT-1300f light freighter"}}

More info about #: charatcher: https://clojure.org/guides/weird_characters#__code_code_and_code_code_namespace_map_syntax

@tonsky
Copy link
Owner

tonsky commented Aug 23, 2018

Oh, right, namespaced maps. I forgot about that. Thanks, I’ll see what I can do

@ghost
Copy link
Author

ghost commented Aug 23, 2018

Thanks :p

@ghost
Copy link
Author

ghost commented Sep 2, 2018

Any improvements?

@tonsky tonsky closed this as completed in 7cf50c1 Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant