[r6rs-discuss] [Formal] Allow compilers to reject obvious violations

From: Shiro Kawai <shiro>
Date: Mon Feb 26 03:47:59 2007

From: Jon Wilson <j85wilson_at_fastmail.fm>
Subject: Re: [r6rs-discuss] [Formal] Allow compilers to reject obvious violations
Date: Sun, 25 Feb 2007 23:46:00 -0600

> I agree that automated bug catching is a useful tool, or a useful
> option. However, perhaps it is not the job of the compiler insofar as
> it is a compiler. I would favor more of a separation of concerns. Let
> the compiler merely compile, and let a lint-like tool catch bugs.
> Perhaps the compiler should invoke the lint, at the user's discretion,
> but I don't think a standard should mandate that a compiler do anything
> other than translate source code into machine code (or bytecode or
> whathaveyou).

Hmm, however, for the bugs such as arity mismatch of local closures,
the compiler doesn't really intend to catch them; during the
course of "translate source code into machine code", it inevitably
finds the discrepancy at the closure analysis stage and cannot
proceed the compilation process, unless it gives up optimizations
and falls back to a naive compilation.

Now I see the call/cc example and realized I *need* to fall back
to the naive compilation. Though, I cannot help feeling it an
extra work (for the compiler) with little practical value.

--shiro
Received on Mon Feb 26 2007 - 03:47:22 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC