proposed patch for PR 72 (method lookup in interfaces)

Godmar Back gback@cs.utah.edu
Wed Nov 3 15:16:00 GMT 1999


 Per,

> 
> Godmar Back <gback@cs.utah.edu> writes:
> 
> > -lookup_java_method (clas, method_name, method_signature)
> > -     tree clas, method_name, method_signature;
> > +lookup_java_method (clazz, method_name, method_signature)
> > +     tree clazz, method_name, method_signature;
> 
> Can we avoid changing one ugly formal-parameter-name
> for one arguably worse?  How about instead replacing
> `clas' by something meaningful, like `receiver_class'
> (or whatever terminology most matches the JLS)?

Good idea, I fully agree.  I just tried to follow suit here
and be "with it".  (Don't you read the New York Times? [Offtopic: 1] ;-)


>From what little I learned about gcj (or possibly gcc) while developing 
this little fix, I am a bit surprised that it works at all.
The whole idea of using one union 'tree' to represent everything in
the system seems like it came from a bunch of lisp programmers 
with no appreciation for types writing their first C program.  
Now I know what respectable people have worked and are working on 
gcc/gcj/g++, so please don't take that comment too seriously, and 
of course there's probably reasons for all this.

But why, for instance, did I have to say CLASS_INTERFACE(TYPE_NAME(clazz))
to determine whether "tree clazz" is an interface?  Why wouldn't 
CLASS_INTERFACE(clazz) work?  If types were used in a meaningful way, 
the compiler would have warned me.  The compiler can be your friend.

	- Godmar


[1] Off-topic:

I wanted to find the URL of an article recently published that pointed
out just how popular the letter z had become ("www.adaptz.com"), but 
it's already gone from their site and in their archives.

You can buy the article for $2.50 though through QPass:
http://archives.nytimes.com/archives/
Here's the description:

    October 26, 1999, Tuesday 

    THE MEDIA BUSINESS: ADVERTISING Zorro would be pleased with the growing 
    use by brands of the letter 'z'
    THE last letter of the alphabet is becoming the last word, as it were, 
    in names. Using a ''z'' at the end of a name -- often in place of 
    the ''s'' that would be there to indicate the plural form -- is growing 
    increasingly popular in advertising, mark ...

    Business/Financial Desk 
    1115 words 
    By Stuart Elliott 


More information about the Java mailing list