-
Notifications
You must be signed in to change notification settings - Fork 31
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
Harmonise our use of !! #653
Comments
It's quite common in Julia that The other two points though are a requirement of the bang-bang convention: Since they may mutate but don't have to, they must return the result and one must not assume mutation. |
Fair point. I first thought, if that's the case, why not call it a |
Very much in favour of this 👍 |
We are currently inconsistent in our use of methods with
!!
at the end of the name. We sometimes call them but discard the return value, assuming they mutate; some methods which return their value are only marked width!
; there may be a few that have!!
in the name but don't in fact always return a value; etc. Once #555 is done I would like to take a pass over the codebase and make it such that[EDIT: See comments]!
methods never return a value.!!
methods always return a value.!!
methods we make use of the return value and don't assume mutation.I would also like to switch to using
!!
methods in many places where we currently use!
methods. For instance, in #555 I'm building towardsVarInfo
being such that you canpush!!
new values to it that don't fit the element orVarName
type of the currentVarInfo
, and if need be a new object is returned with expanded types, although most often that's not necessary and the old object is returned mutated. This might help simplify buildingVarInfo
s that with concrete types.The text was updated successfully, but these errors were encountered: