Ad
  • Custom User Avatar

    Arguments are only mutated if you mutate it like you mutate objects. Reassigning values is like calling a different thing the same name, it does not mutate anything so it's perfectly fine.

    Unless you're intentionally using optional arguments as replacement of var, in which case that would actually make things less readable ;-)

  • Custom User Avatar

    It doesn't change any references. You're thinking of something else which only happens with languages with explicit pointers (e.g C and C++).