Function naming decoration to alert for a deepcopy
in the body
#232
Labels
discussion
Further information is requested
deepcopy
in the body
#232
It might be interesting to extend the
!
concept for when a function usesdeepcopy
. Like this:function f(foo)
: No side-effectsfunction f!(foo)
: Side effectsfunction f!!(foo)
: Hasdeepcopy
and likely side-effectsdeepcopy
can be quite dangerous and sometimes we fall in the trap of calling a function thatdeepcopies
an argument and then use thedeepcopied
argument hoping the modifications would be persistent on the structures modified by thedeepcopying
function.What do you think?
The text was updated successfully, but these errors were encountered: