This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: message primitive
Maciej Stachowiak <mstachow@alum.mit.edu> writes:
> Mikael Djurfeldt wrote:
> >
> > "Greg J. Badros" <gjb@cs.washington.edu> writes:
> >
> > > Again, this is just a question of exposing a C procedure that already
> > > exists as a primitive since it is generally useful but not currently
> > > accessible. It's a nicely-encapsulated idea, that just doesn't make
> > > sense to not have available when it already exists.
> >
> > I was thinking about what kind of language we provide to the Guile
> > users...
>
> I agree with Mikael. My main problem with it is that having too many
> similar procedures provided at the Scheme level can be confusing to the
> user.
>
> This is a matter of API rationality rather than coad bloat.
>
> Personally, I think it would be OK to provide `simple-format' if the
> real
> format is really too heavyweight, but I think at minimum it should be
> changed to use ~s/~S instead of %s/%S for consistency with standard
> format.
That would be even worse to use different escape sequences for the
simple format than for the more complicated one (assumming Mikael is
right about it being ~A and ~S, respectively.
Also, I'm concerned about scm_display_error & backward compatibility.
It can't really go thru and s/%/~/g (or even more precise variants)
since % is a literal in the simple `format' sense.
And if we choose to leave scm_display_error (i.e., instead of rewriting
it in terms of scm_format/scm_simple_format), then we've lost the
original motivation for this change: that it's just a very useful C
procedure that would be nice to have access to at the Scheme level while
introducing almost no new overhead.
> I don't think "the functionality already exists" is a good reason to
> make
> something part of the language.
Agreed; but I felt we'd already established that it was useful. :-)
Greg