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.

(snip)
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, com.oracle now.)
Assuming domain names are unique, that should do it.

-- glen

.



Relevant Pages

  • RE: JAVA un z/OS
    ... Additionally in the case of primitive integers, Java has to ... from Little Endian to Big Endian before sending the CPU instruction, ... than back after the instruction is done. ...
    (bit.listserv.ibm-main)
  • Re: StringBuilder Difficulties
    ... and my *guess* is that this is not horribly inefficient if the ... StringBuilder sb = new StringBuilder; ... that seems less optimal than trying to grok the Java mindset. ...
    (comp.lang.java.programmer)
  • Re: StringBuilder Difficulties
    ... in order to use the language. ... You may have noticed that your issues with StringBuilder seem ... The usual solution in Java is to factor out an API into an interface and ...
    (comp.lang.java.programmer)
  • Re: Is a "real" C-Python possible?
    ... I think most Java-Python benchmarks you can find online will indicate ... Java 1.1) piece of a paper if you read past the "benchmark" part. ... (snip rant about Swing memory leaks, ... Don't write large apps ...
    (comp.lang.python)
  • Re: Great SWT Program
    ... Java Search and Plug-in Search. ... to use Eclipse I'd teach them it's internal search tools. ... (command-line tools as well as an IDE) ...
    (comp.lang.java.programmer)