|
From: Vampire <Vam...@gm...> - 2007-03-02 12:46:57
|
Marcelo Vanzin wrote: >Hi Vampire, > >On 2/20/07, Vampire <Vam...@gm...> wrote: > > >> I didn't look too close to it yet, but one thing falls into my eye >>immediately. About the Action Hints in Parser Rule class. I think you >>shouldn't change the values of public static final fields because they are >>part of the public API. >> >> > >I thought about that. But then I figured that is unlikely that anyone >is actually using those classes outside of jEdit (I don't think the >TokenMarker code is extensible, so why whould plugins use those >classes at all?). I'll double check anyway, but I don't think it >should be a problem. > > You never know who uses it, once you published an API. ;-) I still would say don't change the values, it doesn't do any harm if there is a "gap" between the constants except that someone might wonder why there is this gap. >>There could be places where the actual values are >>stored instead of the variablenames. E. g. in already compiled code where >>the compiler had replaced the variable by the actual value because the value >>cannot change as it is public static final. >> >> > >Yeah, I know that. It's given me trouble before. I wish they didn't >have this "optimization", since it breaks the late-binding semantics >of java classes... > > But they did and so I think we shouldn't change the actual values. >> PS: If it gets applied, all distributed ModeFiles have to be scanned and >>fixed to not use the deprecated attribute >> >> > >Also, documentation would have to be updated. But before checking this >in I need other people to take a look and comment on it just like you >did. :-) > > > > |