You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice being able to use simple def's (without type parameters) in embedded code, as well as lazy values. For example, it would avoid a workaround mentioned in emmalanguage/emma#369.
This should be doable in the same way it's done with things like if/else, i.e.:
code"def f(...) = ... ; ..."// if f is not recursive, as:code"val f = (...) => ... ; ..."
and for recursive definitions, using a Y combinator with by-name parameters, for example for a recursive definition:
code"def f(...) = ... ; ..."// if f is recursive, as:code"val f = Y(f => ...) ; ..."
Finally, it would use an annotation (similar to the one used for implicit bindings) in order to mark virtualized bindings so they can be generated back to their original form when emitting Scala trees.
The text was updated successfully, but these errors were encountered:
It would be nice being able to use simple
def
's (without type parameters) in embedded code, as well aslazy
values. For example, it would avoid a workaround mentioned in emmalanguage/emma#369.This should be doable in the same way it's done with things like
if
/else
, i.e.:In the same way, we could have:
and:
and for recursive definitions, using a Y combinator with by-name parameters, for example for a recursive definition:
Finally, it would use an annotation (similar to the one used for implicit bindings) in order to mark virtualized bindings so they can be generated back to their original form when emitting Scala trees.
The text was updated successfully, but these errors were encountered: