> How difficult would it be to implement reader-macros at compile time
> without requiring compilation flags; using something like e.g.
> require-extension?

It would be difficult, unfortunately. The reads in all toplevel forms
before expanding and canonicalizing them (which would load extensions
and execute compile-time code). This is an architectural limitation
and can be considered a design flaw. On the other hand it clearly
separates the read- and expansion phases, and intermixing read-time
processing with compile-time processing /may/ introduce issues that
often occur in Lisp code between compile- and run-time behaviour.
Reader macros also render source code non-portable. But these are only
lame excuses, of course...

Changing this would require heavy modifications in "batch-driver.scm",
I'm afraid.

If only "autocompile" needs to be enhanced, then it might be an option
to allow some sort of hack to shove options into the source code,
something like:

  #!/usr/bin/env chicken-scheme
  ;; AUTOCOMPILE: -X bisque-colored-parens -O99 -and -make -it -burn
  (print "Hello, world!")

Would that be of any use?


cheers,
felix

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to