Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Function Warnings

Received: by 10.68.236.170 with SMTP id uv10mr7102329pbc.4.1334498300174;
        Sun, 15 Apr 2012 06:58:20 -0700 (PDT)
Path: r9ni59231pbh.0!nntp.google.com!news1.google.com!postnews.google.com!lf20g2000pbb.googlegroups.com!not-for-mail
From: Duane Rettig <du...@franz.com>
Newsgroups: comp.lang.lisp
Subject: Re: Function Warnings
Date: Sun, 15 Apr 2012 06:58:18 -0700 (PDT)
Organization: http://groups.google.com
Lines: 42
Message-ID: <2d270060-8f74-4ae8-9e4c-b89948757d4b@lf20g2000pbb.googlegroups.com>
References: <4f88087f$0$282$14726298@news.sunsite.dk> <1526351241356183618.057820tfb-tfeb.org@reader443.eternal-september.org>
NNTP-Posting-Host: 67.187.242.144
Mime-Version: 1.0
X-Trace: posting.google.com 1334498298 25311 127.0.0.1 (15 Apr 2012 13:58:18 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 15 Apr 2012 13:58:18 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: lf20g2000pbb.googlegroups.com; posting-host=67.187.242.144; posting-account=aGEh5QoAAABuGan_Dwoukh9PssCDiBhh
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8)
 AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3,gzip(gfe)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Apr 15, 5:10=A0am, Tim Bradshaw <t...@tfeb.org> wrote:
> I may have missed it, but I am not sure if anyone has really give a conci=
se
> and correct answer to this (there have been concise and wrong ones such a=
s
> the various "define x before you define y which calls x" ones.

I guess that depends on if there exists a concise and correct answer.
"Have you stopped beating your wife yet?"

> Here's a question for implementors: is there any reason why load should n=
ot
> add an implicit with-compilation-unit when loading a source file? =A0Woul=
d
> that do what I think it should (ie suppress these warnings)? =A0Would it =
be
> conforming?

As you implied, the compilation of a function when its defining form
is evaluated is optional and incidental.  But in the eval-when scheme
of things, there is no :compile-toplevel time - it is all (including
the compilation of each function) part of the :execute time.  So no, I
wouldn't suggest the addition of a with-compilation-unit around
something that is not being handled at :compile-toplevel time.  Note
that there may be some side-effects of the kind you're looking for,
but those may be incidental and perhaps even accidental, and there
would be no reason to count on them in any implementation or in any
future version of an implementation in which it accidentally works.

On the implementation side, w-c-u leaves a lot of wiggle-room.  The
value of the :override argument is unspecified (except that it is
mandated to have the value of nil when it is the one wrapped around a
compile-file).  Whether or not cl:compile is enclosed in a w-c-u form
or not, and whether its :override value is nil or not, are
unspecified.  On one hand, the name "compilation" in the name implies
anything having to do with compiling, but on the other hand, the name
"unit" implies multiple items acting as one.  An incidental
compilation of an evaluated form might or might not be grouped
together into a unit.

Duane