An interesting idea! I think that was one of the original goals of the VPRI project (http://vpri.org) — very high-level executable specs that encoded the meaning rather than worried about performance. IIRC, their 2D graphics library was about 45 LOC (https://raw.github.com/wiki/damelang/nile/socal.pdf)