For VB.Net Users

As I stated in the heading of this blog, I used VB and VB.Net for more than 20 years.
Before that I used Delphi versions 1 and 2, making me familiar with the Object Pascal syntax.
At the moment of writing, I work with Oxygene for 3 month now - All new projects that I do are now in Object Pascal and I am writing the "Oxydizer" for VB.Net (see this as a VB.Net2Oxygene tool) so I can convert my existing applications and leave VB.Net behind me.

Why did I leave VB.Net?
I still think that VB.Net is a really good language, that could have a big future. But Microsoft turned it into a zombie language; each release gets less new things, new technology is not or barely supported (in almost all cases the templates are missing, even if VB.Net could support it). All effort of Microsoft goes into C#, followed by F# and if there are some resources left, maybe VB.Net gets some attention.
Just as Cobol still exists and is used to maintain existing applications, VB.Net does still exist.
But to my opinion it is not safe to use it anymore for a new project.
That is why I left VB.Net.

Why moved to Oxygene instead of C#?
For a Microsoft developer, C#  is indeed the most natural choice; same vendor, same IDE, and - for the most part - the same language - but then completely supported.
But the reasons that I don't like C# are:
  • Case sensitive: means that I can declare var a and var A.Confusing and error (bug) prone.
  • The { and } for bodies. I just don't like them ....
  • Not verbose. Are your really expecting me to remember and understand things like |, ||, &, && and other unreadable things like that?
So, I can read C#. I can write C#. But it won't make me happy.
And then it crossed my mind: Anders Hejlsberg did make C#. But he made another language in the past. That language called Delphi - that I really liked in the Nineties.
So I went to the Embarcado website and downloaded a trial - It was better than C#, but it didn't feel as the right tool. Then went to Free Pascal and Lazarus. This was the same story - it didn't feel like the right tool.
And then I found Oxygene. Object Pascal. Running in the Visual Studio IDE like VB.Net. 100% .Net support like VB.Net. Verbose like VB.Net. Case insensitive like VB.Net. Supported. Maintained.  And with all power of C#.
It felt like coming home.

The positive points of Oxygene for a VB.Net programmer
The positive points of Oxygene (most important for me on the top of the list) are:
  • Supported.
    Bugs are actually solved. Within weeks, sometimes even days.
  • Maintained:
    New available technology is actually added to Oxygene. Language structures that are new to C# are also added to Oxygene. (Even some VB.Net specific things like the My namespace and the VB.Net style event handling were added at my request - in development at moment of writing)
  • Verbose:
    Just readable code. No |, &&, { or other strange characters.
  • Case insensitive:
    No bugs because of casing.
  • Not a second class language:
    All you can do with C#, you can do with Oxygene. And more than that; Oxygene has functions that C# doesn't have. B.e. Non Nullable references are already available for years in Oxygene.
  • Running in the Visual Studio IDE: This means you can - for starters - use your VB.Net dll's with oxygene, giving you a smooth upgrade path. But they have there own IDE also (Water on Windows and Fire on the Mac).
  • Lot faster compiled executables:
    The compiled code of Oxygene is significant faster than the equivalent code in VB.Net .
  • Obfuscation during compile time:
    This was one of my requests that they actually build.
  • Specific VB functionality was ported to Oxygene:
    The My Namespace is available as soon as you reference the Microsoft.VisualBasic.dll and he Visual Basic Event Handling system is available within Oxygene:
    Dim Withevents varName As YourType
         becomes: [ExposeEvents]Var varName: YourType;
    Sub varName_Click(sender As Object, e As Eventargs) Handles varName.Click
        becomes: [Handles("varName.Click")]method varName_Click(sender: Object, e: Eventargs);
  • Almost anything that is requested for VB (but not build) is already available in Oxygene
    See the language requests and discussions at VBLang. About 80% of them are available in Oxygene. Some information about the special things in the Oxygene language, see here.

But what are the negative points?
Of course the switch to Oxygene did cost me some features that I am used to and that I really liked.
The list is:
  • Code completion (CC):
    instead of Intellisense. Less informational (no XML comment information, no explicit parameter information, no filtering of keywords). I did a request for better CC where I showed the differences, see here. Use firefox or chrome to open this link, otherwise you can not see the video.
  • No Codelens:
    meaning no simple reverse callstack browsing and no information on the importance (meaning: the amount of places where this routine is called from) of the method.
  • No background compiler:
    This means that most of the errors only surface when you compile, and when you edit a dll, you have to compile it first to get the updated information in the dependent projects.
  • Somewhat slower editing:
    Code completion and editing in Oxygene is slower than I am used to in VB.Net, especially with large code units and in units with a lot of errors (by example during a refactoring).
  • Less stable editor:
    The editor has sometimes it's issues - restart of Visual Studio will solve the problems in almost all cases
You see that it is not all heaven and rejoice. But I think that the impact of the positive points are a lot bigger than the impact of the negative points. And Object Pascal is easy to learn for someone that did VB for years; I even think that the step to Oxygene is smaller than the step to C#.

My advice: Try Oxygene. And get hooked to it 😃.