Malcolm said:
It's Dr McLean.
I have designed a language from scratch. It's called MiniBasic and is
available on the web.
It's based on BBC Basic, but I made a few changes, for instance it's
possible to intialise arrays rather than using read / data statements,
which many beginners find confusing.
To change the C include system you don't need to rewrite a compiler
from scratch, just constuct an "stdheaders.h" file. It's not a good
idea, because of backwards compatibility, and because, unless you are
the ANSI committee, you shouldn't be trying to redefine the language
in this sort of way.
What would that stdheaders.h file consist of? I use a technique that one
header file includes the appropriate headers depending on what
preprocessor conditional is defined. For example.
// Example entry in stdheaders.h
// (Additional REQUIRE_XXX defines may be and probably will be
// defined by in this main header. i.e., The dependency "analysis" is
// done here via preprocessor conditionals and the necessary headers
// are then included in a proper order below).
//
#if defined REQUIRE_THREADS
# ifndef THREADS_H_
# define THREADS_H_
# include <thread/threads.h>
# endif
#endif
// Some using source file
//
#define REQUIRE_THREADS
#include <stdheaders.h>
Basically, I'm doing dependency management manually, and that results in
more orthogonal code rather than the spaghetti-like standard library
inclusion pattern. It's a real boon during library development since all
the files don't have to be updated with the #include statements as the
library evolves and the dependencies change.