Specifically C# and and the devil’s spawn VB.Net
C# is one of my favorite languages. It feels so clean and i enjoy programming in it. Even before i did my first project in C# about 4 years ago, i’ve read a lot about it. At the time, it seemed to me that the Microsoft people, and specifically Anders Hejlsberg, wanted to create a language that fixed the design mistakes of all the previous languages. So whenever i do get to code with C#, i feel right at home.
C# has a nice c-based syntax and structure and is an OO language. It also has a familiar event-delegate model. It has an excellent class library and has some very good tools written around it. And the most important thing is that it has excellent documentation.
But not all stories are full of roses, and the problem with .Net in general is that it is done by Microsoft. I don’t have anything against Microsoft except that i believe that frameworks should be open-sourced and MS hates open source.
It is important for all frameworks to be open-sourced because we need to be able to see the source. I’ll give you an example. I was once working with the HTMLEditorKit in the java class library, and i wanted to have a sync document on a JEditorPane and i tried following the documentation to do that. But it didn’t work. According to the documentation, it is quite possible to do so simply by setting the async priority on the created document. But i found out that the document created at each request is reset to an async one. So off i went to take a look at the source code and realized that this is happening because at each new request, a new document is getting created. So after i saw that, i just extended the htmleditorkit and made my own creation method and everything was ok. Then i discovered several bugs in the html implementation in the java class library(some fixed in newer versions) and i can see where and how and why and so on….
Another example, i once needed to work with an ActiveX object(boy that was a mistake) using C# and i was trying to do something that again according to the documentation was quite possible. Only it didn’t work. And after searching for several days through several forums, i found out that it is a confirmed problem but MS wasn’t interested in fixing it nor does it have any workaround. So what am i supposed to do. I can not see what is going on or what is wrong to know how can i go around the problem. Needless to say that i eventually re-wrote a few things to avoid the problem but it took a lot of effort(and several late nights).
But let’s say that you won’t face such problems since the real issue was with the ActiveX object itself and not the class library(being an all MS environment, most of the .Net class library simply delegates to the OS or works in a similar manner). The problem then really becomes an issue of vendor lock-in. I don’t want to be an all MS shop. Because then you’d have to run on windows-only and use MS-only technologies and that’s just unfair and from a technical point of view, completely twisted.
Other than the fact that i am a Linux user, i really dislike windows-only environments and technologies because they behave in the same suck-y way. So doing an open spec is one thing, but what i really need is an open framework.
I know about mono and dotGNU, but i have only tried mono on some small desktop apps. At the time, i hit a few bugs and a few unimplemented methods and that was the end of that. I really would love to use mono in some big project and i am constantly staying up-to-date with its implementation so we’ll see where that goes. By the way, did anyone actually use mono in a project and can share the experience? I am interested in web-based applications mainly. I know about most of the rest.
If you have noticed, i didn’t say anything about VB and its VB.Net cousin. This is mainly because i think that the devil’s greatest 2 successes was convincing people that he didn’t exist(not necessarily a he…i think the devil would probably be a blonde with blue eyes) and creating VisualBasic. Then the devil continued his evil after VB became the most used language in the world, and upgraded VB for the .Net platform thus creating VB.Net. So unless i really really have to or there’s a lot of money involved, i wouldn’t use it at all. I will leave it to the readers to guess the details.