[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A (Low-Level) Opaque Object Proposal for R5RS
> So. Am I full of shit or are these conclusions valid?
No one has suggested that Michael Blair is full of anything.
In my previous message I did not even disagree with any of
his conclusions, except to observe that the optimizations
he proposed, while they are certainly feasible, are with
equal certainty not being performed by any existing Scheme
Aside from that and some uninteresting details of terminology,
Blair and I are in violent agreement.
> I have not looked at every existing Scheme compiler.
> Again, I have not scrutinized every existing Scheme compiler so I cannot
> say whether or not this is correct.
> Naturally, I cannot make any claim about every existing Scheme compiler.
My claim was of the form "No existing compiler does X", which is
logically equivalent to "Every existing compiler does not do X".
Blair does not need to examine all existing compilers to repudiate
this claim. A single counterexample would suffice.
Blair is correct that his optimizations are similar to some of
the optimizations that existing compilers perform. I did not
deny this, nor did I deny that Blair's optimizations could be
added to existing compilers.
In fact, it appears that my own Twobit compiler performs every
single one of the general optimizations that Blair appeals to
in support of his argument. I wouldn't have known this from the
terminology he used. For example, we seem to disagree on whether
a lambda-bound variable that is captured by several lambda
expressions, whose results are stored into global variables,
constitutes a heap-allocated variable, and on whether a static
analysis that must examine the code for the several global
procedures that result from those lambda expressions constitutes
an interprocedural analysis.
> Huh?! OPAQUE-VEIL in my proposal was a special form. As such, its
> underlying implementation is not revealed to the Scheme user. It is a
> reserved identifier that signals to the compiler to emit a hunk of code,
> possibly at the machine language level, that the Scheme programmer cannot
> access at the Scheme language level. So the above paragraph makes no sense
> to me at all.
The fact that something is a special form does not imply that
its underlying implementation is not revealed to the Scheme
user. That assumption needs to be made explicit, as I pointed
out. I am glad to see from the above paragraph that Blair agrees
The fact that the underlying implementation of a special form
is not revealed to the Scheme user is still not enough to justify
the optimization in question, because the user might be able to
guess the implementation. We must make the stronger assumption
that the Scheme programmer has absolutely no way to forge ("access"?)
the values created by OPAQUE-VEIL. I am glad to infer from the
above paragraph that Blair agrees with me about the need to make
this assumption explicit also.