We have the need to generate code that initializes
certain variables and runtime-related values with
expressions that can't be evaluated statically
at compile-time.  One method to do this, would be
to create an __attribute__ ((constructor)) function
that contains statements which initialize the
valures of interest.

Are there language dialects that already have this
requirement to evaluate and assign initial values
at runtime?  Do they use a general mechanism like
the constructor attribute or somehow roll their own?
(I can see how GCC's constructor mechanism may not
be sufficiently general for Ada, for example).

Ideally, I'd prefer to use some already developed
and proven code/approach rather than re-invent the
wheel.  Any pointers/tips appreciated.

thanks.

Reply via email to