The isomorphic approach is different from that of abstractions. It is based on mapping the underlying hardware without making use of third-party libraries and by matching complex and heterogeneous structures, albeit homologous, to each other. The code written with this approach, when it works well that is when it is satisfactory in terms of execution speed or use of resources, is already optimized on any other platform.
As an example, let's see how the programmer can write on the visible screen. MIDRES exposes many functions for drawing. All refer, directly or indirectly, to tiles. Tiles are the basic units of drawing and they are available everywhere, in large number.
The simplest way is by using the
mr_puttilev(fireX, fireY, TILE_LASER, MR_COLOR_YELLOW);
As you can see, this call draws a yellow (
MR_COLOR_YELLOW) laser stroke (
TILE_LASER) at position
(fireX, fireY). Here the version used is the one with the suffix “v, to indicate that it should be drawn on the visible screen.
What does that
TILE_LASER mean? It's a placeholder. The MIDRES library will pass it “as is” to the underlying hardware. Just as it will with color.
Ok but who defines this symbol? Which graphics will it be associated with?
This is a problem of the MIDRES library, which must find a way to “match” what the programmer requires with what is available in terms of resources. In other words, the porting can be reduced to a correspondence between homologous parts (which generally perform in a similar way).
It is clear that this is possible only if the library is isomorphic because, if it were not, it would not even be possible to write WORA programs because (trivially) the logic with which the program is written will not be linked to the way in which the target computer works but to the way the abstraction works (in this case, the MIDRES library). The efficiency will depend on how the programmer moves “according to the grain of the wood”, so it becomes a WORFILLI (Write Once Run Fine If Library Likes It).
Move to page THE ABSTRACTION THAT IS NOT THERE