You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently everything in the computation side of the code (i.e. not the lexer) is pass-by value (i.e. fn foo(self)). I think this is mostly OK, because stuff doesn't need to be used once it's combined into another value e.g. let c = a + b once that's been done it really doesn't matter what a is, it can go out of scope, but for things like DivisibleBy where you are just gaining some knowledge about a number and then using that to decide what to do with the number, pass-by-reference (i.e. fn foo(&self)) should be used.
The text was updated successfully, but these errors were encountered:
Currently everything in the computation side of the code (i.e. not the lexer) is pass-by value (i.e.
fn foo(self)
). I think this is mostly OK, because stuff doesn't need to be used once it's combined into another value e.g.let c = a + b
once that's been done it really doesn't matter whata
is, it can go out of scope, but for things likeDivisibleBy
where you are just gaining some knowledge about a number and then using that to decide what to do with the number, pass-by-reference (i.e.fn foo(&self)
) should be used.The text was updated successfully, but these errors were encountered: