I don't see how a lazy language would let me implement my own version of
`let`. Care to enlighten me?

- Sam Caldwell

On Fri, Apr 8, 2016 at 7:10 AM, Norman Gray <nor...@astro.gla.ac.uk> wrote:

>
> Greetings.
>
> Quoting Asumu quoting Matthias:
>
>  I'd like to propose that there are three disciplined uses of macros:
>>>
>>>  1. data sublanguages: I can write simple looking expressions and
>>> [...]
>>>
>>>  2. binding constructs: I can introduce new binding constructs with
>>> [...]
>>>
>>>  3. evaluation reordering: I can introduce constructs that delay/postpone
>>>  [...]
>>>    [Note: In Haskell, you don't need that one.]
>>>
>>
> This is a seriously naive question, because I have only trivial experience
> with Haskell (and by extension other lazy languages), but aren't each of
> these things that you can do with a lazy language?
>
> If I can control when an expression is evaluated, then I can obviously do
> (3), but supposing I can also control the environment within which it's
> evaluated, can't I also do (2) and thence, with suitable juggling, go on to
> (1)?  Asumu's further example of 'use of macros that expand into submodules
> in order to provide metadata for other programs/tools' sounds at least
> complicated to do lazily, without macros, but not fundamentally impossible.
>
> Macros are obviously not the same as lazy evaluation (though from the
> point of view of the macro expander, perhaps all the post-compilation
> stages are 'lazy'), but I'm having a hard time seeing why it's obvious
> they're not isomorphic.
>
> I imagine there may be both pragmatic and fundamental semantic reasons why
> the two are different.
>
> All the best,
>
> Norman
>
>
> --
> Norman Gray  :  https://nxg.me.uk
> SUPA School of Physics and Astronomy, University of Glasgow, UK
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to