On Sat, 9 Sep 2000, Erik Meijer wrote:
> With the SDK that you can download from MS comes a 500 page specification of
> the runtime and the IL. So if you have a free Saturday and you want to get
> famous, then give that Linux implementation a try.
But is this specification sound and complete? I'd a look at the C#
speccifcation, which is a bad joke. For example, there's a section about
the switch statement, which elaborates on the "fall-through" problem. From
my memory (I don't have the specs at home):
To prevent accidently fall-throughs by a forgotten "break", each case
has to be ended cleanly, either by an explicit "break", or by a "goto
label", or by a return statement, or by throwing an exception, or by doing
anything else the compiler can prove that the next case block isn't
reached. For example, the following is legal:
switch(foo(x)) {
case 42:
while(true) {
..
}
case 43:
...
}
>From the Specs:
"Obviously, the loop in the 42-case does not terminate, so it's legal to
omit the break after the loop."
With this nice example, M$ either forces a C# compiler to solve the
halting problem (since it has to decide wether a certain piece of code
terminates or not), or makes the decision about what is legal code an
implementation depenent one. (What about the body of the loop? What about
"while(f(x)) {...}"?)
If the runtime specifications of .NET are of the same quality, there's no
way to port it to another system.
Ciao,
Kili
--
Auf deutschem Boden darf nie wieder ein Joint ausgehen.
[Wolfgang Neuss]