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

Re: Couple things...



On 27 Dec 2003 12:35:56 -0800, Thomas Bushnell, BSG <tb@xxxxxxxxxx> wrote:

felix <felix@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

Exactly for that reason I propose to simplify the interface, and
to remove space for dirty tricks and to specify the meaning of the
forms rigorously.

I am aghast that you think taking the address of a function is a
"dirty trick"--especially since you are talking to a group of Scheme
programmers!  Good grief.

Oh, come on.


What *is* a dirty trick, and I am, I think, rightly worried about, is
the dirty tricks that *implementors* play when you tell them to do
things with a macro.  Functions are *far* more predictable than
macros; they have a single well-defined semantics.  C macros can be
tricky to write correctly.

You, as a user, don't have to write that macro. The dirty tricks
that implementors have to play, when trying to conform to this SRFI,
might be unavoidable.


I don't believe you simplify *anything* by saying "you can do this
with a macro if you like".  In practice, that is done in C standards
precisely when you want to give implementors weird flexibility.  Look
at, for example, the way that errno is allowed to be a macro in C, and
why.

It looks like you never designed and implemented a Scheme FFI.
That flexibility on the implementors side is important. *Especially*
if portability is required.


Moreover, you still will have people doing things like:

#if defined (foo)
do it where foo is a macre
#else
take the address of foo
#endif


People will do all sorts of weird things. So what?


cheers,
felix