Interfaces for BlitzMax

BlitzMax Forums/BlitzMax Programming/Interfaces for BlitzMax

Otus(Posted 2008) [#1]
Got an idea from the other thread about implementing Java-like interfaces using reflection and meta data.

Does this look in any way useful?


Output:
Hello World!
Got message: Hello World!
Hi!
Got message: Hi!



Brucey(Posted 2008) [#2]
Useful yes :-)

But reflection isn't very fast. So it's not the sort of thing you'd want to use if speed was important.


Otus(Posted 2008) [#3]
Yeah, it may be relatively slow.

Here's the code. A bit of a hack, but I tried to make it readable: