There is a straightforward workaround to this objection. Make a list of the 100 or so most common functions in Base
such as the operators (+
,-
,:
,etc), common functions like size
, length
, collect
, in
, etc., and require some special syntax to redefine this fixed set of functions if the redefinition appears inside another function definition. The list can stay fixed even as Base
grows.
Old-timers like me can recall that early versions of Fortran were widely mocked because programmer error could lead to the possibility of redefining constants (like 2.1
). Julia should not fall into the same trap!