Re: Operator overloading spec document

kgw-news@stiscan.com
12 May 2002 00:03:21 -0400

          From comp.compilers

Related articles
Operator overloading spec document abbottk@earthlink.net (2002-05-08)
Re: Operator overloading spec document kgw-news@stiscan.com (2002-05-12)
Re: Operator overloading spec document s.moleski@student.tcu.edu (Sebastian Moleski) (2002-05-12)
Re: Operator overloading spec document delbec@clio.unice.fr (Christian DELBE) (2002-05-23)
| List of all articles for this month |
From: kgw-news@stiscan.com
Newsgroups: comp.compilers
Date: 12 May 2002 00:03:21 -0400
Organization: Solution Technology
References: 02-05-035
Keywords: Java, design
Posted-Date: 12 May 2002 00:03:21 EDT

On Wed, 8 May 2002 04:12:43 UTC, abbottk@earthlink.net (Kirk Abbott) wrote: WEEKDAY


>I am trying to implement operator overloading in a Java extension. I
>am trying to find any document with formal details on operator
>overloading. In particular issues such as type resolution, what would
>be the equivalent non-operator-overloaded code that is generated
>etc...


Since you are in Java and there are no free standing procedures all
you need to do is convert operators to internal method names and apply
them.


if + corresponds to _opPlus then A + B becomes A,_opPlus( B );


Then let the method resolution do its thing.
For errors convert the _opPlus back to + in the message.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.