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

No type piracy in ACSet schema description types #383

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

epatters
Copy link
Member

Resolves #382.

@epatters epatters requested a review from olynch February 12, 2021 02:23
@epatters epatters added the bug label Feb 12, 2021
@olynch
Copy link
Contributor

olynch commented Feb 12, 2021

So, the one thing is, and this is the reason I made these accessors in the first place, that I use ob, hom, data, and attr as variable names all over the place. This isn't necessarily a reason why this shouldn't be merged, but it's something to keep in mind, and maybe we should shift to using variable names C, f, X, and a.

@epatters
Copy link
Member Author

epatters commented Feb 12, 2021

One indication that this isn't too bad is that in the whole codebase, I only had to change the variable names in one or two places! You can't use ob as a variable name if you also use it as a function, but you can use it in list comprehension variables and local function argument names, which is often good enough.

@epatters epatters merged commit 2018ac7 into AlgebraicJulia:master Feb 12, 2021
@epatters epatters deleted the cset-type-piracy branch February 12, 2021 20:03
@KristofferC
Copy link

KristofferC commented Mar 5, 2021

An alternative is perhaps to create (singleton) instances of the types and then use getproperty on those (similar to how nothing tends to be used over Nothing). Using types as "values" tends to be a bit awkward, especially when you want to start adding methods to them.

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

Successfully merging this pull request may close these issues.

getproperty type piracy
3 participants