Ruby on .NET (was Re: A Ruby WishList)

//I think that was a reasonable statement. Given MS’s track
//record, I can
//see why someone would find it difficult to believe that they would be
//truly interested in leveling a playing field. They are a corporation,
//and most people realize that corporations only serve their own
//interests, and the interests of their stockholders. They got
//in trouble
//in trouble already once for un-leveling the playing field between
//languages (remember the whole java thing?)
//
//To paraphrase Orson Wells, “The playing field is level; just
//some areas
//are more level than others.”

Yes I remember ‘the whole Java thing’, MS actually added event handling
to that language and they threw it out and sued them and went for a
slightly brain-dead implementation with whole classes to implement
callbacks! But that’s not the point is it? And the latest EU - I mean
when I had my Win 98 and I couldn’t find a decent video player why
werent the suing MS for Media Player or its only that the product has to
be avilable to 6-7 years after which it should be sued for not being
‘trust’ worthy?

Really, I don’t want this to be a flamefest - the CLI is built to run IL
code, IL looks like a processor neutral assembly langauge.

This is C code
#include <stdio.h>

int main() {
for(int i =0; i<0; i++)
printf(“hello world”);
return 0;
}

And this(take a deep breath) is IL generated:

; .proc.beg
; File d:\roshanj\work\cpp\syntax\hello.cpp
; Line 4
ldc.i.0 0 ; i32 0x0
stloc.0 ; _i$614
br.s $L615
$L616:
ldloc.0 ; _i$614
ldc.i.1 1 ; i32 0x1
add
stloc.0 ; _i$614
$L615:
ldloc.0 ; _i$614
ldc.i.0 0 ; i32 0x0
bge.s $L617
; Line 5
ldsflda $SG618
call ?printf@@$$J0YAHPBDZZ
pop
br.s $L616
$L617:
; Line 6
ldc.i.0 0 ; i32 0x0
br.s $L635
$L635:
; Line 7
ret
.end ?main@@$$HYAHXZ ; main
; .proc.end.i4

The code is demand-JITed and optimised at runtime. This is part of the
execution services that the CLI provides. Similar code is generated by
COBOL, VB, C#, C++, Mondrian, F# (Ocaml variant - funtional), VJ#. All
languages that can be expressed as IL are essentially equal.

For the sake of completeness, the CLI, class libraries, C# and other
things as standardised under ECMA and ISO - which means MS does not own
the specs unlike the JVM being owned by Sun.

Now I am not going to argue for MS, but I would like to defend the CLI
to the extned that there is a misunderstanding - if you have made up
your mind about its intentions, then I probably can’t help. You must see
that I would defend Ruby as much, had someone ignorant about the
language come along and said things about it.

See if Ruby cant shift to the CLI for technical reasons its fine - give
the other guys a chance to fix them by stating the reasons. If you
simply want to do your own thing that’s fine too, but then uders of the
language miss out on the entire Managed world, which is very large.
But if the reasons, are to gauged by things like ‘antitrust’, for want
to better words, I don’t think that’s very smart.

  • rosh

InterScan_Disclaimer.txt (520 Bytes)

Hi

just being curious…

Since CLR/.NET etc… is designed for statically typed languages and have
penalties like casting involved, will using it be a good thing?

rolo