From: Marco Antoniotti
Subject: Re: Compilation insight requested.
Date: 
Message-ID: <lw7lqrwufc.fsf@copernico.parades.rm.cnr.it>
Kent M Pitman <······@world.std.com> writes:

> Marco Antoniotti <·······@copernico.parades.rm.cnr.it> writes:
> 
> > many thanks to all who have responded to the "extra-method"
> > question. It looks like my fears have been confirmed.  Anyway...
> 
> So that people have outlined
> WHY losing is a virtual certainty  seems something to revel in, too.
> :-)
> 
> Sorry for the unsolicited sermon if it's not useful to you.

It is most useful and I enjoyed reading it. Almost Buddhist in
nature.

I send an answer to the main thread on the reasons why I
overconstrained the problems. Also, I gave a reason why you can blame
Barry Margolin for it :)

> > Here is another small piece of code that is giving me some problems.
> > 
> > I have a file named one.lisp which contains exactly the following.
> > 
> > ===========================================================================
> > 
> > (defun make-1 () 1)
> > 
> > (defconstant +one+ (make-1))
> > 
> > ===========================================================================
> > 
> > My question, due to the laziness of going through all the past
> > postings on DEFCONSTANT and friends is simply the following.
> > 
> > What behavior should I expect from COMPILE-FILE of one.lisp?
> 
> I guess you're not looking for "possible textual confirmation that
> your compile completed, return values confirming the fact, and a side
> effect on the file system in which a loadable file is created", huh?

Not quite. The compiler (CMUCL 18b) gives a MAKE-1 undefined error.  I
suppose for all the good reasons you give in the remainder of the post.

This time I will use the "acceptance" spirit and rewrite my code (I
have already done that), always remebering that it is simplicity that
is difficult to make. :)

Cheers

-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa
From: Vassil Nikolov
Subject: Re: Compilation insight requested.
Date: 
Message-ID: <7gkul8$hj4$1@nnrp1.dejanews.com>
In article <··············@copernico.parades.rm.cnr.it>,
  Marco Antoniotti <·······@copernico.parades.rm.cnr.it> wrote:
(...)
> > >
> > > (defun make-1 () 1)
> > >
> > > (defconstant +one+ (make-1))
> > >
> > >
===========================================================================
> > >
> > > My question, due to the laziness of going through all the past
> > > postings on DEFCONSTANT and friends is simply the following.
> > >
> > > What behavior should I expect from COMPILE-FILE of one.lisp?
> >
> > I guess you're not looking for "possible textual confirmation that
> > your compile completed, return values confirming the fact, and a side
> > effect on the file system in which a loadable file is created", huh?
>
> Not quite. The compiler (CMUCL 18b) gives a MAKE-1 undefined error.  I
> suppose for all the good reasons you give in the remainder of the post.
>
> This time I will use the "acceptance" spirit and rewrite my code (I
> have already done that), always remebering that it is simplicity that
> is difficult to make. :)

I think it is more than acceptance spirit.  If one wants to be fully
portable, one must be prepared for compilers that will want to
evaluate the DEFCONSTANT init form at compile time.  (As the spec
says (quoting from memory), the init form may be evaluated at
compile time, load time, or both.)

By the way, since your MAKE-1 returns a fixnum, it is not the
most interesting example one could think about.  Bigger cans
of worms are:

  (defun make-2 () '(a b c))
  (defun make-3 () (list 'a 'b 'c))
  (defun make-4 () (make-instance 'some-user-class))
  (defun make-5 () (read))  ;for the most brave only

--
Vassil Nikolov <········@poboxes.com> www.poboxes.com/vnikolov
(You may want to cc your posting to me if I _have_ to see it.)
   LEGEMANVALEMFVTVTVM  (Ancient Roman programmers' adage.)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own