Re: Naive question: C-- vs. CLI

Norman Ramsey <[email protected]> Fri, 09 Sep 2005 16:04:10 -0400
Newsgroups gmane.comp.lang.c--
Message-ID <[email protected]>
 > Since we are implementing a new language, it would appear that we have
 > three plausible target runtime strategies:
 > 
 > 1. Roll our own.
 > 2. Use an existing one (probably C--)
 > 3. Target CLI.
 > 
 > I would like to understand what factors should inform a decision between
 > C-- and CLI for research purposes. Can anybody provide informed input on
 > how to evaluate these alternatives for research purposes?

I will give you my view; Simon Peyton Jones may have a better informed
opinion. 

CLI comes with a very heavyweight type system and run-time system.  If
these are useful to you, or at least fit your needs, CLI may become
very attractive.  Also I'm sure the manpower investment in CLI is at
least 100x that in C--.  So they're much more easily able to do
things, although it may be hard to get their attention.  We're quite
interested in being steered by users, but there aren't very many of us...

I don't know how portable CLI is really going to be.  If you want to
run your code on lots of hardware, particularly if you want obscure
embedded platforms, you're more likely to get help with Quick C--,
which is designed from the ground up to be portable across machines as
well as languages.

Regarding how to evaluate: my advice is to postpone your decision.
Presumably the implementation you are writing will have a front end
that will have a low-level intermediate language.  My advice is to
design that language to be a lot like C--, perhaps with extensions.
Then you'll be in a much better position to evaluate alternatives for
code generation.  Simon can say more about how this strategy has
worked out for GHC.


Norman