At 06.41 -0700 0-09-11, Simon Marlow wrote:
>> From what you say, it looks as though one isn't forced using
>> GCC...
>
>Unfortunately not; we need gcc. Well, strictly speaking the requirement is
>a compiler that supports ISO99 C (or whatever it's called) since we use some
>of the features which until recently were "gcc-specific extensions" but are
>now ISO C: zero-length arrays, labelled structure initializers, etc.
>Removing the uses of these features would be something of a pain.
If they are ISO C, then one might expect other compilers picking it up.
One other way around it is to switch to C++; the C++ compilers should be
sufficiently efficient by now. It is possible program conservatively with
C++, and only successively replacing C-code with C++. (The new ISO C will
also become compatible with future C++.)
In fact, I have just started doing this with the Mac Hugs port: :-)
(Normally I program in C++, and not C.)
Some things are much easier to do in C++. (I think that even GCC must be
able to compile the C++ STL these days. :-) )
An OO language is much better if one should put in that concurrency stuff,
as every break of encapsulation is a potential hazard for process clashes.
C++ is right now worthless with threading and implementing a conservative
GC and such, but I figure C isn't much better (I figure concurrent C isn't
very widespread). So if one should do that, one ends up with Java, which
hopefully by now has a better conservative GC. (The work on GC's is taking
off so radically, so it might not be worth the effort for the Haskell
bothering implementing their own in the future.) Perhaps C++ will become
better in the future. I also saw a USENET news thread about combining C++
with EC++ (Embedded C++), so C++ might be better for implementing low level
stuff if the future.
Hans Aberg