[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [DotGNU]Is the C compiler a CLS extender?
From: |
Mark Easton |
Subject: |
RE: [DotGNU]Is the C compiler a CLS extender? |
Date: |
Fri, 5 Sep 2003 10:01:11 +0100 |
The fact you can get C compiled to IL is cool enough to keep me happy,
but the more I look at different languages that compile to IL, the more
I realise that the CLI is decidedly unfriendly to classless and typeless
languages
Cheers for the info.
M
-----Original Message-----
From: Rhys Weatherley [mailto:address@hidden
Sent: 05 September 2003 00:42
To: Mark Easton; address@hidden
Subject: Re: [DotGNU]Is the C compiler a CLS extender?
On Friday 05 September 2003 09:39 am, Mark Easton wrote:
> Just a very quick question, but I've been reading the CLI specs again
(I
> know, it'd be healthier to get a social life but those specs send me
> wobbly at the knees) and I'm wondering if the C compiler can actually
> create CLS compliant code or not? I know it pumps out IL, but I'm
> guessing it can't do much with attributes which I assume means it
can't
> actually generate CLS compliant code.
Actually, it has more to do with types than attributes. The C compiler
outputs global methods and fields in the "<Module>" type, which are not
normally going to be accessible to a strict CLS-compatible language. C
programs also make heavy use of unsigned types.
Of course, where it makes sense for the C compiler to be CLS-compatible,
then
we will be; e.g. when calling C# code from C. Unfortunately, Microsoft
didn't define a CLS profile for languages that lack classes, like C
does.
I'm certainly open to suggestions as to how to make C more CLS-friendly.
Cheers,
Rhys.