Erased eDSL #15576
Unanswered
Adam-Vandervorst
asked this question in
Metaprogramming
Erased eDSL
#15576
Replies: 1 comment
-
I think you really shouldn't need to have |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The idea is to have zero-overhead embedded DSLs using erased classes with erased methods as combinators, compiled to Scala via metaprogramming.
As a minimal example, let's say we want a DSL for constructing and manipulating functions
which can be used as follow:
with the attempted implementation:
Is this something in the language's vision?
Currently, this bumps into a couple of conflicts (like case classes not being erasable), but I was surprised by how elegantly erased and metaprogramming could model this together.
Moreover, many common paradigms like those of IO and database-ops could be expressed like this without causing overhead.
Beta Was this translation helpful? Give feedback.
All reactions