So far, we have said that the only things in an interface are static and
non-static methods. I want to identify a bunch of other things that can
(and in some cases must) live in an interface:

Type definitions and declarations
Constant definitions (e.g. for enum and/or union labels)
Attributes *declarations* (which we have discussed).


I'm going to go a tad further, and propose that the syntax for declaring an
attribute "i" of type "int32" should be:

interface SampleInterface {

...

int i;

}

That is: from a syntactic perspective it *looks* like a field declaration.
There is a method to my madness here, but before I say what it is I want to
learn how many of you lost your lunch in response to this.

Finally, I'm going to adopt a convenience shorthand. An interface
declaration preceded by "static", as in:

static interface MyStaticInterface {

... declarations ...

}


Is a convenience shorthand for saying that every method and attribute
declared within the interface is static.


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to