I've noticed a couple of peculiarities I would like to get peoples opinions on.
First is this:
I'm trying to add a Equals method to an interface and at compilation I'm getting the error:
Attempt to override method 'Equals' in class 'Progress.Lang.Object', but OVERRIDE was not specified. (13000)
This is an interface, not a class.
Why do I have to specify override? This doesn't seem to be necessary in c# or java...
Second:
Progress has engineered the .NET bridge in such a way that System.Object is (or seems to be) derived from Progress.Lang.Object.
Then how come System.Object isn't exposing the Equals method with a Progress.Lang.Object as parameter, but only as System.Object?
I've noticed a couple of peculiarities I would like to get peoples opinions on.
First is this:
I'm trying to add a Equals method to an interface and at compilation I'm getting the error:
Attempt to override method 'Equals' in class 'Progress.Lang.Object', but OVERRIDE was not specified. (13000)
This is an interface, not a class.
Why do I have to specify override? This doesn't seem to be necessary in c# or java...
Second:
Progress has engineered the .NET bridge in such a way that System.Object is (or seems to be) derived from Progress.Lang.Object.
Then how come System.Object isn't exposing the Equals method with a Progress.Lang.Object as parameter, but only as System.Object?
Flag this post as spam/abuse.
Same behavior for ToString() and Clone()...
Re 1st question: It is not strictly necessary for the compiler to complain about this in an Interface definition. But ultimately, any class that uses this must implement this method. And then they will get the error anyway that OVERRIDE must be specified. So we just give the error sooner rather than later.
Re 2nd question: Yes, we've engineered things so that all objects, including .NET ones inherit from Progress.Lang.Object (or act like they do). Yes, strictly speaking you are correct. The .NET object should have two Equals methods, one that takes a System.Object and one that takes a Progress.Lang.Object. If they pass a System.Object we should call .NET. If they pass a Progress.Lang.Object we should call our own AVM routine. So I guess it's a bug, but I don't really see the use case for this. And I'm not sure the latter case would really do the right thing (would have to think about that some more).
Thanks Laura, it's this kind of technical information that gives some insight in how things are implemented behind the scenes.
I don't consider any of these a bug by the way...
That's good :-)