[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Textal interface to Guile

From: Marius Vollmer
Subject: Re: Textal interface to Guile
Date: 01 May 2001 21:20:13 +0200
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Keith Wright <address@hidden> writes:

> > [scm_listify]
> >
> > Nope, you should be using SCM_UNDEFINED.
> > 
> > Background: Both SCM_EOL and SCM_UNSPECIFIED can legitimately show up
> > in a list, but SCM_UNDEFINED will trigger a "variable unbound" error
> > when referenced (at certain strategically choosen points, it is not
> > checked for everywhere).  So SCM_UNDEFINED can be used to terminate
> > the arguments to gh_list, while SCM_EOL and SCM_UNSPECIFIED can not.
> This is counter-intuitive.

Maybe, but what can you do?  We could alias SCM_UNDEFINED as
SCM_LISTIFY_TERMINATOR.  Or we could make scm_listify take an explicit
element count:

    scm_listify (1, my_obj)

For short lists, we already have it:

    SCM_LIST1 (my_obj)

> Maybe scm_simple_format should take a variable number
> of arguments itself, since that is what the Scheme
> procedure does.

We can not change scm_simple_format since it also _is_ the Scheme
procedure (unless overwritten by (ice-9 format)), but we can have a
second interafce to it, scm_c_simple_format that could take varargs.

> Worth the trouble to change or add?  Not sure.

Me too, but patches will be gladly accepted... ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]