On Sun, Jul 01, 2007 at 03:48:36PM +0300, Nikodemus Siivola wrote:
> Thomas F. Burdick wrote:
> > On 6/29/07, Nikodemus Siivola <nikodemus@...> wrote:
> >> I have a patch that implements a way to globally restrict
> >> policicies in SBCL:
> >> (restrict-compile-policy 'safety 1)
> >> will override any local declarations or global proclamations
> >> of SAFETY 0.
> >> The point is to make it easy to recompile large bodies
> >> of code with eg. a given mininum SAFETY or DEBUG policy.
> > This looks great, and extremely useful. However, I'd also like to be
> > able to restrict the upper values. For example,
> > (restrict-compile-policy 'debug '<= 2) or something.
> I'm not too averse to this, but it gets tricky as it means that
> you'll be able to make safe code unsafe, when other parts may
> be relying on some error-checking guaranteed by the said safe
> ...and saying that upper limit affects all other qualities except
> safety is just tacky. It might be the way to go, though. Or it
> might be that some sort of warnings are in order after all.
I'm enthusiastic about the basic idea of this patch, but because of
issues like TFB raised (his issue, and another mentioned in a reply) I
am somewhat skeptical about getting such a patch right the first time.
It's not that it's hard to keep it from being a solid mass of
showstopper bugs, but it might take a while to settle on a spec where
you don't end up saying "working as designed" too often. (In my
experience anything policy-related where you have settings which
override other settings --- not just in compiler behavior, but in
networking or security or scheduling priority or error handling or
whatever --- tends to be tricky this way.)
I don't think we have any particularly well-developed tradition for
things which are particularly tricky this way, but for this patch I
think it might be a good idea to invent something. Perhaps a status
like "useful but currently experimental and unstable: if you hassle us
for changing the interface in four months, we will laugh at you either
to your face or behind your back or both..."
William Harold Newman <william.newman@...>
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C
Ubi saeva indignatio ulterius cor lacerare nequit. -- Jonathan Swift's epitaph