Archive for the 'C#' Category

Virtual or non-virtual by default, do we really have to choose?

When it comes to the question of whether methods should be virtual by default or not, there are two schools of thought. Anders Hejlsberg, lead architect of C#, describes them in an interview from 2003.
The academic school of thought says, “Everything should be virtual, because I might want to override it someday.” The pragmatic school [...]

D doesn’t have real closures

Delegates are something that gives me mixed feelings. While I used to embrace them in Delphi and Object Pascal, I now find them difficult to get used to in C#. I guess that is because they introduce a little of the functional programming paradigm into an otherwise object oriented environment.
Don’t get me wrong, I do [...]

Great use of annotations

C# entered the field of battle some seven years ago as a better version of Java. The one feature that many people referred to when claiming C# superior, was custom attributes. Now Java has them too, but they go under the name of annotations.
The ability to attach meta data to various parts of your program [...]