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

uniquify might could use gensym? #9

Open
jpfairbanks opened this issue Oct 7, 2020 · 1 comment
Open

uniquify might could use gensym? #9

jpfairbanks opened this issue Oct 7, 2020 · 1 comment

Comments

@jpfairbanks
Copy link
Member

I saw this helper function uniquify and it looks like you are manually creating unique symbols. Julia provides a builtin for that called gensym which makes symbols.

julia> gensym("foo")
Symbol("##foo#253")

it looks like you can't use # in SQL identifiers, so maybe gensym and then replace would work like:

replace(gensym(tag), "#"=>"_")
@bosonbaas
Copy link
Member

This is good to know. Originally I was concerned about readability issues (making sure that uniquify just iterates when copies are found), but I think that gensym will have a natural place in the new ACSet refactored work.

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