AlgebraicRelations.jl icon indicating copy to clipboard operation
AlgebraicRelations.jl copied to clipboard

uniquify might could use gensym?

Open jpfairbanks opened this issue 5 years ago • 1 comments

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), "#"=>"_")

jpfairbanks avatar Oct 07 '20 13:10 jpfairbanks

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.

bosonbaas avatar Oct 19 '20 17:10 bosonbaas