-
Notifications
You must be signed in to change notification settings - Fork 126
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
conventions about function names #1335
Comments
I guess we can collect a few and then go through everything. If done right, this should not be a breaking change anyway. I don't think there is a point in trying to "do all at once", as on the one hand, that'll just delay improvements we could make now, and on the other hand, I see no real benefit? For the permutation group, I think I see no real upside to having |
As to specifying the return type: I don't think there is any need or way to sugar coat this, and I consider it a substantially different problem from understanding the difference between |
I am not sure we should introduce aliases for the types, e.g., I would be in favour of having all functions adhere to the usual snake case convention. |
Merged into #1826 |
It is helpful for Oscar users (in particular for beginners) if one can guess the names of functions one is interested in.
According to the general Julia conventions, capitalized names are "reserved for" modules and types, but Oscar provides quite a few functions with capitalized names.
PolynomialRing
for the construction of a polynomial ring. A user would probably trypolynomial_ring
first, and there is a function with this name but without a docstring and with a different meaning.CyclotomicField
vs.cyclotomic_field
; here we have docstrings for both variants.FiniteField
, there is currently nofinite_field
variant.There are more such examples.
Shall we collect them and then perform one big renaming in order to get a more consistent naming scheme, or shall we fix them one by one as soon as we are aware of them?
A related question is about those situations where users are expected to use types (with capitalized names).
For example, it is handy to call
PermGroup(G)
for some groupG
if one wants an isomorphic group that is represented by permutations (and if one wants to ignore the isomorphism object).Or should we recommend to use a dedicated non-capitalized function for that purpose, in this case
perm_group
?(It will not be possible or desirable to hide types from users. For example, it is useful to specify the result type of a function by passing this type as an argument, as in
exponent(Int, symmetric_group(4))
orquo(PermGroup, G, N)
.)The text was updated successfully, but these errors were encountered: