4 ms·
Yes, we considered that. There were two reasons we wrote a standalone language instead: * It gives more flexibility and simplicity, regarding both syntax and
by Athas 8y ago
Yes, we considered that. There were two reasons we wrote a standalone language instead:
* It gives more flexibility and simplicity, regarding both syntax and type system. The compiler can also more easily analyse the AST, because there are no artifacts of an embedding.
* An embedded DSL is practically available only to users of the host language. In contrast, Futhark is equally accessible to many languages, either via direct code generation (such as for Python), or using a fairly simple C FFI.
The best example of an embedded high performance DSL is, I believe, Accelerate[0] for Haskell. It is really good, but is ultimately only accessible to Haskell programmers, and the implementation has to solve non-trivial problems related to the embedding.
[0]: http://hackage.haskell.org/package/accelerate http://hackage.haskell.org/package/accelerate