Arc Forumnew | comments | leaders | submitlogin
1 point by eds 6121 days ago | link | parent

Thanks, although it seems to regard mostly macros.

PG commented "The single biggest compromise I had to make because of MzScheme was not being able to put objects like functions and hashtables into macroexpansions." Not exactly sure what he meant by that, or if it had anything to do with the evaling functions directly.

I guess what I am really wondering is if there is an intrinsic reason why evaling a function directly can't work, or if support for it just doesn't happen to be in Arc currently because PG never needed it.



3 points by cadaver 6121 days ago | link

From the tutorial:

  [Note: Like functions, hash tables can't be printed out in a way
  that can be read back in.  We hope to fix that though.]
The problem that I see with macros+hashtables in macroexpansion, as well as with printing/reading-back-in functions+macros+hashtables, is that currently an expression is compiled, before it is evaled, and loses its original uncompiled form. That's why macros are currently not truly first-class.

If used with eval or in macroexpansions this only causes a problem with macros and hashtables, not with functions or hashtables used as functions. Like nlavine pointed out, it only takes an additional line of code in "ac" to make your example work.

-----

2 points by soegaard 6119 days ago | link

Hash tabels ought to be easy to fix by setting the MzScheme parameter print-hash-table to #t. See

http://download.plt-scheme.org/doc/352/html/mzscheme/mzschem...

-----