Skip to content

RISC y APIs

Kevin Greer edited this page Oct 16, 2024 · 1 revision

FOAM allows for what I call RISC-y API's. Consider the original design of CISC (Complex Instruction Set Computer) CPU's. People were programming these CPU's in mostly assembler, so it was important that they have a lot of features (ie. instructions and addressing modes) and be easy to use. However, this ease of use came at a cost: added complexity and lost performance. Eventually, high-level languages became more popular and people coded less and less in assembler. This is when the CPU designers realized that they could create RISC (Reduced Instruction Set Computer) processors with much smaller and faster instruction sets, because it didn't really matter how easy or convenient they were to program any more, because humans were no longer directly programming them: compilers were. FOAM's MVC framework is like this. It realizes that it is not meant to be programmed by hand, but rather, programmed by a compiler (ie. FOAM), and so can get away with a much smaller and faster interface. This is why our DOM-View library is only 4k lines (including whitespace and comments) and our Canvas-View library is only another 1200 lines.

The DAO mLang query API is another excellent example.

Clone this wiki locally