J
Jon Skeet [C# MVP]
Nick Hounsome said:I'm sorry, I don't seem to be communicating my point - I'll try again:
It is possible to have C++ without a standard library (except for type_info
etc) - I've used it myself for embedded work. It is NOT possible to have C#
without System.Object, System.String, System.MulticastDelegate etc.
That's true. However, the exact nature of those types is only very
partially described by the C# spec.
What ties C# more tightly to the CLI is various guarantees about
garbage collection, construction, try/finally behaviour etc. Anyone
wanting to write an environment to support C# from scratch is likely to
end up with something very similar to the CLI, I suspect. (It would be
interesting to see what the barriers to C# being compiled directly to
native code are. I don't think there are many requirements for
reflection etc, for instance.)
I may have been a bit lax in my use of framework/library/CLI but my point
remains that however you define it there is a mutual dependency between
these things and C# that doesn't exist between C++ and its standard
libraries.
There do indeed have to be a few types available in order to support
C#.