Wednesday, August 01, 2012

[idalnedm] Feature test

The most common use of the preprocessor is to test for the existence of a library function.  A half-baked idea to bolt the capability directly into the language:

If exists a function "foo"...

If exists a function "foo" of type "Bar -> Baz" ...

If exists a function "foo" with no side effects which evaluates to Y on argument X ...

If exists function of type "Bar -> Baz", then bind it to the name "foo"...

We need to avoid "The next sentence is true.  The previous sentence is false" circular reference paradoxes.

No comments :