Re: HOF implementation of "until"
- From: Andre <andre@xxxxxxxxxxxxx>
- Date: Thu, 10 Nov 2005 17:20:02 -0500
Joachim Durchholz wrote:
> > Case expressions themselves may be regarded as syntactic sugar
> > as described in figures 3.1 and 3.2 from the Haskell report.
> > I give one example of the productions there. The fact that
> > Haskell compilers may optimize these is beside the point.
>
> It's beside the point only if it's clear that macros can apply all
> optimisations that a compiler could. Anybody with insights into that?
The point was whether these expressions could be understood as syntactic
sugar or not. Optimization was beside it :-)
Macros are certainly not the place for these kinds of optimizations.
While it is clear that standard compiler techniques should be able to do
quite a bit of optimization on the post-macro-expanded object code,
it is true that a compiler written to handle certain constructs specially
will usually generate better code. But various Scheme compilers already
handle various standard macros specially, and do various types of
static type inference and optimizations, so there is no inherent
deficiency with this approach.
Regards
Andre
.
- References:
- Re: HOF implementation of "until"
- From: Dirk Thierbach
- Re: HOF implementation of "until"
- From: Adrian Kubala
- Re: HOF implementation of "until"
- From: Vesa Karvonen
- Re: HOF implementation of "until"
- From: Dirk Thierbach
- Re: HOF implementation of "until"
- From: Andre
- Re: HOF implementation of "until"
- From: Dirk Thierbach
- Re: HOF implementation of "until"
- From: Andre
- Re: HOF implementation of "until"
- From: Joachim Durchholz
- Re: HOF implementation of "until"
- Prev by Date: Re: HOF implementation of "until"
- Next by Date: Re: HOF implementation of "until"
- Previous by thread: Re: Exhaustive matching via Scheme macros
- Next by thread: Re: HOF implementation of "until"
- Index(es):
Relevant Pages
|