This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: interface reductions
- To: Marius Vollmer <mvo at zagadka dot ping dot de>
- Subject: Re: interface reductions
- From: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Date: Fri, 2 Jun 2000 10:39:35 +0200 (MEST)
- cc: Guile Mailing List <guile at sourceware dot cygnus dot com>
On 1 Jun 2000, Marius Vollmer wrote:
> Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
>
> > The proposed change is shown as a patch below. It basically
> > deprecates SCM_FLUID_NUM, SCM_FAST_FLUID_REF and
> > SCM_FAST_FLUID_SET_X, and provides as a replacement for these the
> > macros SCM_FLUID_DATA and SCM_SET_FLUID_DATA. If there are
> > suggestions for better names, I'd be happy to hear them. Otherwise
> > I am going to apply that patch.
>
> Why not just name the macros SCM_FLUID_REF and SCM_FLUID_SET?
It was agreed upon in a discussion to have the SET immediately follow the
SCM_ prefix. Thus, following your suggestion we would have:
SCM_FLUID_REF and SCM_SET_FLUID or, maybe
SCM_REF_FLUID and SCM_SET_FLUID
That would also be OK, I think. However, it seems that the _REF postfix
is primarily used in guile for types where there is not just one single
datum to be extracted:
SCM_FRAME_REF(frame, slot)
SCM_BITVEC_REF(a, i)
I. e. the _REF macro takes an additional argument. (I think those are all
other _REF macros found in .h files - except SCM_FAST_FLUID_REF.) In
contrast, the _DATA variant is used in cases where there is exactly one
datum to be extracted.
I don't want to claim that this is a policy that we need to follow - I
just had to decide for a name and thought it would make more sense that
way.
> But more importantly, there should remain documentation about how to
> properly use SCM_FLUID_DATA, etc. I think the comment should not be
> removed, just the last sentence of it.
Good point.
Thanks for your comments.
Dirk