Hacker News new | ask | show | jobs
by Fice 2754 days ago
My mistake, I misread the docs. Anglican can actually be considered to be an embedded DSL.

> An important design feature is that it is 'anti-DSL' --- the syntax is exactly the Clojure syntax.

This is not "anti-DSL", this is what gives Anglican embedded DSL qualities.

And yet there are limitations: «The border between Clojure and Anglican is subtle and usually will pose no problem to most programmers, however, some confusion can arise from the fact that Anglican programs are macro compiled into CPS-style Clojure functions. This means that some wrapping of “native” Clojure functions needs to happen in order to use them in Anglican. Errors arising due to misunderstanding this boundary crop up in the form of “wrong number of argument” exceptions».

Would that language border, wrapping of functions and transformation to CPS be still necessary in a language with native support for continuations?

1 comments

Anglican is a CPS state monad. Clojure functions are automatically lifted into the monad, but to maintain fast execution of Anglican code, Clojure functions must be declared as such to Anglican.

A language with native support of continuations is a nice toy but does not bring practical benefits to implementing CPS state monad.