James Taylor wrote:
What we're talking about is .Net. .Net is a compiled language called CLR, which you then write in any language you like in, that compiles to that CLR. So I can write in C#, you could write in VB, someone else could write in J# and we could all use each others libraries and classes as if they where written in our own langauge... So when I talk about C#, some times I am talking about it as a langauge (i.e. its syntax) and sometimes I'm talking about how .Net works.
Not wishing to be to picky, however, this is as I understand what happens under Windows; Linux and Mono may be different. The .Net languages are compiled, but not to native machine code but to CLR - Common Language Runtime code - this is an intermediate level language (it used to be called MicroSoft Intermediate Language (MSIL)). This code is then compiled at runtime to native machine code. This second compilation step is performed not by a traditional compiler, but by a Just In Time Compiler (JIT Compiler) which compiles the CLR code into Machine code just in time, before it is needed. To be honest, I've never seen why this is supposed to be an advantage as the end result seems to be slower than native machine code. If the developer compiles the code, then the slow compile stage is done by the developer, and the user gets to run fast native code. Also, the code necessarily has to be understandable by the JIT compiler, so it is easily decoded - in other words, users can easily see the source code - not so much a problem in the open source world of Linux, but in the proprietary world of windows, you have to take special measures to obfuscate your code if you don't want any one to copy it.
I liked a lot of things about VB.NET, but one thing I didn't like was Non-deterministic Finalisation. I like my programs to be deterministic! I also didn't like the way that .NET programs felt free to allocate themselves vast swathes of memory just in case they needed it, even for a "hello world "program.
I have tried to use VB under Mono, but I haven't got it working yet - there seems to be some issue with the VB compiler, I may try again. But I'm dubious still about if Microsoft will let people use it for several years, and then pull a patent out of the bag and make us pay loads of money to continue using it - I doubt their motives basically.
I expect I'll dip my toes in the programming waters again, but I'm not sure what I'll try - perhaps C++ as I used to do it. Perhaps Vala, with is a C#-alike language, but it "compiles" to C code, which can then be compiled to machine code.
We'll see.
Night all! Steve