|
Re: addJavaBeanMethods: msg#00046lang.scala
On Fri, 2006-02-10 at 16:12 +0100, Martin Odersky wrote: > I thought the set/get methods would simply forward to Scala's native > setter and getter? In that case what difference does it make which > method is called? Certainly. I did it like that because (1) that was the easiest to implement, just name translation, and (2) if we have true-and-through attribute support what difference would the name of the actual method being called make? The frontend will know the methods by the names from the symbol table it reads from the classfile, while the backend will translate names if necessary. Anyway, I'm not religious about that. I hacked the backend because that's what I'm most familliar with. If the Beans-style getter/setter are additional forwarders that be in the tree so it is visible via the -print option. Also, I think it's easier to generate the tree for the forwarders than to emit additional method definitions/bytecode by hand in the backend. I'll try to implement proper attribute support before anyone can abuse this new feature. Otherwise, anyone is free to refine it in the way that seems most appropriate. Nikolay |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: addJavaBeanMethods: 00046, Nikolay Mihaylov |
|---|---|
| Next by Date: | issue with inherited static members in java interfaces (possible bug?): 00046, Jason Kinzer |
| Previous by Thread: | Re: addJavaBeanMethodsi: 00046, Martin Odersky |
| Next by Thread: | Re: addJavaBeanMethods: 00046, joel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |