Paul L wrote in article
<856033f20906082224s2b7d5391gdc7a4ed913004...@mail.gmail.com> in
gmane.comp.lang.haskell.cafe:
> The open question is whether there exists such a
> solution that's both elegant and efficient at maintain proper sharing
> in the object language.
What is your criterion for
Interpreting lambda calculus is neither cheap or efficient, otherwise
we wouldn't all be using compilers :-)
By "interpretive overhead" of adding Let/Rec/LetRec to an object
language I mean the need to introduce variables, scoping, and
environment (mapping variables to either values or structures
On 2009-05-27T03:58:58-0400, Paul L wrote:
> One possible solution is to further introduce a fixed point data
> constructor, a Rec or even LetRec to explicitly capture cycles. But
> then you still incur much overheads interpreting them,
I don't understand this criticism -- what interpretive overhe
Conal Elliott wrote:
> Sittampalam, Ganesh wrote
>> In my experience [1], observable sharing using GHC's stable names is a
>> pretty effective solution to this problem.
>
> Plus unsafePerformIO and weak references as in *Stretching the storage
> manager: weak pointers and stable names in
> Haskell
BTW, I doubt the (cyclic) sharing problem relates that much to purity,
because in an impure language (or the unsafe observable sharing), you
still have to remember whether something has been traversed or not and
in the worst case accumulates everything that's been traversed so far
before releasing
Let-expression in the EDSL indeed solves the sharing problem, but only
partially.
Recursion appears when you have a leaf node pointing back to the root
node or another branch and forming a cyclic graph in the data
structure. It is often desirable to recover cyclic sharing when
showing/reading/inter
Henning Thielemann <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]> in
gmane.comp.lang.haskell.cafe:
> It seems to become a FAQ. I think all DSLs suffer from the same problems:
> sharing and recursion. I've used wrappers for CSound, SuperCollider,
> MetaPost, they all have these problems.