dynamic loaders

Doug Gwyn gwyn at smoke.brl.mil
Sat Apr 27 04:38:07 AEST 1991


In article <14530 at ccncsu.ColoState.EDU> swanbacd at handel.cs.colostate.edu (daniel thom swanback) writes:
>The problems it has produced are a direct consequence of the following:
>                 1. Every function needs a return of any valid C
>                    type
>                 2. Every function takes on a variable length
>                    parameter list
>                 3. Every parameter in the list has to be
>                    declared as any valid C type.

The real problem is that these requirements are absurd when combined
with an additional requirement of implementation in C.  C is a typed
language and these requirements explicitly require violation of typing.

While I could suggest all sorts of techniques for trying to "somehow"
achieve this impossible task, in my opinion the necessity of such
requirements should be challenged.  If it turns out that there really
is a firm requirement for these attributes, then consider defining an
interpreted language in which to implement such operations.  (You
could reasonably implement the interpreter in C.)

>This is a key concept of a menuing system.  It must have the
>ability to run a user selected function from a variable number of
>instances where its invocation would be required.

I don't understand why you couldn't impose constraints on the "user
selection functions" that would permit a reasonable C implementation.



More information about the Comp.lang.c mailing list