|
Re: Attempting to Define Interface Oriented Programming Languages
|
Posted: Dec 28, 2005 10:44 AM
|
|
> > Regarding the blog: I think a code example (even > > pseudo-code) of definitions and use, could clarify, and > > make comparisions to existing features easier to make, > > because I have a hard time understanding what you mean, > > here. > > Good point, thanks. Anything specific which is > particularly unclear?
> > Regarding the blog: I think a code example (even > > pseudo-code) of definitions and use, could clarify, and > > make comparisions to existing features easier to make, > > because I have a hard time understanding what you mean, > > here. > > Good point, thanks. Anything specific which is > particularly unclear?
Well, to take what you write in your blog:
"in an IOPL dynamic function dispatch occurs in the interface, not in the class itself."
Here, it's not clear what you mean. An "interface" can occur in many forms; the member functions of a class or object (and potentially free functions that takes the object as a parameter), may be considered a class' or object's interface. Then you may have a subsystem interface, perhaps consisting of several classes. Another interface may be defined in terms of a webservice, and so on. However, from your previous writings on interfaces, I assume you mean something like Java's "interface" keyword.
From this standpoint, I still have a hard time deciphering what you mean by the quote above. You have a code example with Pet interface/class, and Cat and Dog classes. Perhaps you could have completed this one, by showing how this may be used, as well?
Hm, I think I may know what you're getting at. In earlier blogs, you've described a feature of Heron, where one may use interfaces, that work similar to "duck typing" or "concepts", but unlike concepts or constrained genericity in languages like C# or Java, these may be bound at compile-time or run-time, depending on the information that is available. In other words, similar to C++ templates (or better, "concepts", but as it doesn't exist in C++ (yet), I use templates as an example), but being able to bind also at run-time. Is that right?
Regards,
Terje
|
|