[e-lang] swtgrid quasiparser broken in current SVN
Kevin Reid
kpreid at mac.com
Mon Apr 23 15:13:34 EDT 2007
On Apr 23, 2007, at 14:25, Mark Miller wrote:
>> In other words, the literal '0' is being passed as an int (48) to
>> the first
>> overloading above, which produced a character result instead of an
>> int result.
>>
>> This is probably caused by the recent changes to the overloading
>> of Java sugar
>> methods, but I haven't traced it further. Can you take it from
>> here? Thanks.
>
> Perhaps the simplest way to fix this is to find all cases where we
> overload sugar methods on argument type and fix them so they no longer
> do? Does this sound reasonable?
When I made the change, I assumed that there were no sugar methods
relying on overloading, and when I asked you, you agreed. This has
now been shown to be false.
So, we should approach this as a design problem rather than a bug
fix. What is the right thing?
Searching for "OverloadedMethodsWithSameNumberOfParameters" (which I
do not understand the use of, but appears in the comments for those
methods) finds only occurrences in CharacterSugar.java.
Do you know whether this annotation is applied thoroughly?
If so, or if we otherwise find that this is the only occurrence of
such methods, then we can just change the CharacterSugar methods to
do an E-style switch/match as they would if they were written in E.
If there are more, then we should consider whether overloading (with
or without typed verbs) should be reinstated, perhaps with an
exception for Miranda methods rather than for all sugar methods.
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list