Home > .NET, Software Development > Language style – are all .NET languages the same?

Language style – are all .NET languages the same?

Thycotic has recently engaged on a consulting project that is completely VB.NET. This is not our usual (C#) stomping ground so there are plenty of opportunitiesfor us tolearn new things and make sure that we steer clear of the religious arguments! I have been developing primarily in C-style languages for most of my career so the transition has been interesting.

Whileconsulting at the BBC a number of years back, I was fortunate to cross paths with Karen Bearkley – an accomplished Perl developer who had come to Perl from C. She often commented how important it is to not writePerl in a C style but rather to take advantage of the diversity ofthe language and its unique constructs. If you don’t write in the flavor of the language you will be forcing your pen rather than letting it flow …

This got me thinking about our C# to VB.NET transition …

  • Will our VB.NET code look like a C# developer wrote it?
  • Does the framework really level all .NET languages?
  • Is there still enough diversity to make each unique?

There must be some truth to this idea even in .NET since we have adopted some new standards which feel somewhat C#-ish to me:

  • Never use the root namespace – always declare your namespace in each type
  • Adding overridable to all methods (or was this our Java hold over?)
  • Option Strict On and Option Explicit On
  • Never usethe Microsoft.VisualBasic namespace
  • Still be picky about exact case
  • Use a refactoring tool (CodeRush/Refactor Pro! supports VB.NET)

What do find when you move between .NET languages?

Categories: .NET, Software Development
  1. Javier Luna
    May 26, 2005 at 2:45 am

    I believe that any DataLayer must be a simple code block, that they allow operations against DB.

    That code block would not have to know on the Business Entities. Single to specialize it is to execute the operations (Store Procedures and SQL Sentences) against the engine DB (SQL, Oracle, DB2, etc.), with which this setting.

    Finally, I invite to you to download the DataLayer.Primitives Public Version.

    This is very cool Data Layer 🙂

    DataLayer.Primitives – Readme!
    http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=1389

    Cheers,

    Javier Luna
    http://guydotnetxmlwebservices.blogspot.com/

  2. Atilla Ozgur
    May 26, 2005 at 1:16 pm

    Except for this standart,”Never use the Microsoft.VisualBasic namespace” all of them are valid to me. I have started as C# programmer after 8 month, started using VB.Net. After 9 months using VB.NET, I am back to using C# again. I think that two languages has their strengths but Visual Basic.NET IDE is more powerfull than C#.NET. My opinion is that instead of forbidding visual basic namespace, teach your developers that functions. They can come very handy. I sometimes use them in c# projects. After all that namespace is part of .net framework.

  3. Javier Luna
    May 27, 2005 at 3:08 am

    I believe that any DataLayer must be a simple code block, that they allow operations against DB.

    That code block would not have to know on the Business Entities. Single to specialize it is to execute the operations (Store Procedures and SQL Sentences) against the engine DB (SQL, Oracle, DB2, etc.), with which this setting.

    Finally, I invite to you to download the DataLayer.Primitives Public Version.

    This is very cool Data Layer 🙂

    DataLayer.Primitives – Readme!
    http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=1389

    Cheers,

    Javier Luna
    http://guydotnetxmlwebservices.blogspot.com/

  4. Antonio Chagoury
    May 27, 2005 at 8:41 pm

    Atilla,

    I must disagree with you here.

    By using the Microsoft.VisualBasic namespace you are using COMInterop. Basically, Microsoft wrapped the VB6 namespace into managed code. Don’t be fooled, it is COMInterop. It will add the VisualBasic.dll assembly to your project bin folder.

    Additionally, any ‘good’ vb guy will tell you they use the Option Strict On and Option Explicit On.
    Why did Microsoft leave this in the .net framework? – The answer is simple: portability.

    Yes, VB allows you to do really nasty things to your code, but I see this as a feature, a flexibility – not a shortcoming.

    Finally, I believe that there is an audience for each language.

    — Beginners use C# (It is strict – it will not allow you make to many boo boos)
    — Experts use VB.net (you know what your doing – why not do it in plain english?)

  5. Jonathan Cogley
    May 31, 2005 at 4:14 am

    Antonio’s comment about a ‘good’ VB guy certainly makes sense. It is always possible to write good or bad code in any language!

    Is .NET the first platform to have a common framework and multiple languages? Does this level the language playing field? – I wonder.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: