Ugly!


 


C# Syntax for having an interface implement another interface:


public interface I2 : I1


Now the same in VB.NET:


Public Interface I2
Inherits I1


“inheriting” an interface… Ugh.  Why oh why does my client prefer VB.NET???   (Answer: it isn’t case sensitive.)


 


 


 

Comments (1)

  1. Marc says:

    It should be said that you could write "public interface I2 : I1" as "Public Interface I2 : Inherits I1". So the only difference is the word "Inherits".

    Remember that VB.NET is based on 4GL thinking. The 4GL philosophy aims to have code that is more self explanatory and easier to read. So C# assumes you know what ": I1" means. VB.NET does not make the assumption.

    All that said, this begs the question as to why C# is case-sensitive. Given that every developer with half a brain knows that you should never declare two variables with only case differences in their name, why would they not make the language case-insensitive. I just don’t see the point of case-sensitive syntax in a modern language.

    If anything, it would have had a dramatic impact on the adoption of C# and .NET in general.