Interfaces for BlitzMax
BlitzMax Forums/BlitzMax Programming/Interfaces for BlitzMax
| ||
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! |
| ||
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. |
| ||
Yeah, it may be relatively slow. Here's the code. A bit of a hack, but I tried to make it readable: |