Thien-Thi Nguyen <t...@gnuvola.org> writes:

> As years go by, i have come to venerate old code per se less and
> less.  I think it would be cool to write tools to distill the
> essence of old code, recasting into new code.  That is what
> compilers do, after all...

If the new compiler/translator framework in Guile 1.9.x is capable of
handling ECMAScript and elisp, it should certainly (in principle) be
able to handle slightly different variants of Guile Scheme.  So that
might be a good way of handling any recasting at runtime.  I believe it
also supports writing out recast code - although perhaps at the cost of
losing some formatting and comments.

>  Dreaming, i'd like to see compilers
> that go beyond:
>
>             compilation
>   source ---------------------> "executable" representation
>
> to
>
>   grok-db -----+<-------+
>                v        |
>             compilation |
>   source ---------------+----> "executable" representation
>
> where grok-db contains the analysis results of (this and other)
> source, both present and past.

Can you give an example of what grok-db might say?

Also note that grok-db is in a sense already present, in the source code
of the compiler.

Regards,
      Neil


Reply via email to