Re: Function to compares two arrays and returns indices where they are equivalent

Ron Shepard <ron-shepard@xxxxxxxxxxxxxxxxxx> wrote:
(snip on reusing function names)

Yes, but it's not the same way. I don't use Matlab, but I do use
Mathematica, and it has the same kind of structure that function
names are global.

I believe, though, that you have to explicitely override the
Protected attribute on built-in functions before you override
the function. That will slow down the problem.

BTW, speaking of namespace conflicts, having
methods that require the class name class.method() doesn't solve
this problem. You might as well just define the global symbol to be
class_method(). Without the scoping and local renaming facility
(like in fortran), you still have the namespace conflict problems.

For Java and instance (non-static) methods, it is object.method(),
where it is the class of the object that matters. For static methods,
it is usually class.method(), but object.method() is also allowed.

For many there is import, which is somewhat like Fortran USE.
If you don't import it, then the name must be fully qualified.

For packages, which is a Java way of qualifiying names,
the suggestion is to reverse the order of the domain name
qualifiers. That is, com.sun for Sun. (Well, now.)
Assuming domain names are unique, that should do it.

-- glen