[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Proposal to add fexprs

On Sun, 17 Nov 2013 17:19:00 +0700 musicdenotation@x wrote:
> Why is static analysis a problem? The compiler can tell whether
> something is a function or a macro by looking at it's source code.
> If it's from a library, look at the source code of a library or the
> library should flag whether a procedure is a function or a macro.

Everything is okay provided that such macros are only used in the way
you in particular anticipate, in a language that is implemented in
the way you presume it will be implemented. Bitter experience over
decades say this is not nearly so simple as you presume.

> Anyway, you can specify fexprs as an optional part of the language,
> so that anyone interested can implement it.

You have not actually proposed any means to deal with the distinction
between the binding environment at the location where the fexpr is
invoked and the binding environment inside the fexpr. A simple
example of why this is a very hard problem was given already.

(I will point out that the situation is harder than that still if you
presume compilation rather than interpretation and people rebind a
symbol from a normal function to a fexpr.)

You seem to believe that all of this is trivial. I suggest that you
implement your proposals in at least one compiled scheme system
before proceeding any further.

Perry E. Metzger		perry@x

Scheme-reports mailing list