On Tue, Apr 12, 2016 at 5:18 AM, Didier Verna <[email protected]> wrote:
>
>   What's the reason for restricting types and macros to the toplevel?
>   Isn't there something like macrolet?

For types, it will be much harder for the compiler to infer anything
about it, if a new type is to be created every time. And if you want a
new type every time you run the code (in a local scope), you should
just use `eval`, which doesn't require special compiler support and is
just as fast/slow.
"anonymous" types, i.e. types you can create instance of that doesn't
require declaring explicitly is support in the form of anonymous
functions on 0.5, similar to how lambda is implemented in c++11.
Tuples are similar too.

Macros cannot be scope local (without major change of everything)
since they are executed at compile time and doesn't know anything in
the scope.

>
> Thanks.
>
> --
> ELS'16 registration open! http://www.european-lisp-symposium.org
>
> Lisp, Jazz, Aïkido: http://www.didierverna.info

Reply via email to