Related articles |
---|
[2 earlier articles] |
Re: Representing Closures in C tommy.thorn@gmail.com (Tommy Thorn) (2006-07-21) |
Re: Representing Closures in C johan.tibell@gmail.com (Johan Tibell) (2006-07-22) |
Re: Representing Closures in C wyrmwif@tsoft.org (SM Ryan) (2006-07-23) |
Re: Representing Closures in C haberg@math.su.se (2006-07-23) |
Re: Representing Closures in C tommy.thorn@gmail.com (Tommy Thorn) (2006-07-25) |
Re: Representing Closures in C tommy.thorn@gmail.com (Tommy Thorn) (2006-07-25) |
Re: Representing Closures in C haberg@math.su.se (2006-07-25) |
From: | haberg@math.su.se (Hans Aberg) |
Newsgroups: | comp.compilers |
Date: | 25 Jul 2006 17:56:57 -0400 |
Organization: | Mathematics |
References: | 06-07-073 |
Keywords: | functional |
Posted-Date: | 25 Jul 2006 17:56:57 EDT |
<tommy.thorn@gmail.com> wrote:
> > However [de Bruijn indexing] an elegant method, I am told that it hard
to use in debugging,
> > as it is difficult for humans to interpret. So in actual functional
> > language implementations, it has not been used so much.
>
> This is really no different than the problem of tracking source level
> variables in the optimized assembly. A tedious task for humans, but
> that's what compilers use symbol debugging entries (eg. DWARF2) for.
To begin with, I am just quoting some Hugs/Haskell developers. I am
not saying not to use it. But I would think that implementing a
correct functional language is considerably more difficult than
working with assembly code, simply because one works on a higher
mathematical structural level with less direct intuition.
> If it sees little application in practice it may have more to do
> with the fact that it's still only a step on the road to an
> efficient implementation.
The best way to find out, I gather, is to try it. If debugging becomes
difficult, it comes to my mind, one might perhaps try a hybrid, where
the computer uses de Bruijn indexing, and variable names are somehow
retained for the user.
If you go beyond a simple functional language, towards theorem provers
which binds variables in several types of ways, then definitely, getting
it correct is a major hurdle. Then, humans must be able to efficiently
read the formulas, and verify them by hand, otherwise efficient debugging
cannot expect to take place.
--
Hans Aberg
Return to the
comp.compilers page.
Search the
comp.compilers archives again.