Freestanding functions in C#
Being a C++ programmer, every time I work with C# I wonder why it lacks support for freestanding functions; in other words: functions that are <em>not</em> part of any class.

Every new version of C# I expect this feature to be added, but for some unclear reason the designers don't find it important. I think this is very strange, because standalone functions allow to add functionality to classes without requiring full private access, avoiding hard to maintain monolith classes. Furthermore, it allows extending third party libraries. I know, you can use a static class, but the class name is totally irrelevant, making the client code unnecessarily verbose.

Apparently, the C# team does find it important, as they added the "<em>extension methods</em>" feature to C# 3.0. I think this is a truely great feature, which largely solves the need for freestanding functions. However, in some cases when you have 2 parameters of a different type, it will be hard to decide to which of both types to add the extension method.

Freestanding functions in C#
===

Being a C++ programmer, every time I work with C# I wonder why it lacks support for freestanding functions; in other words: functions that are <em>not</em> part of any class.

Every new version of C# I expect this feature to be added, but for some unclear reason the designers don't find it important. I think this is very strange, because standalone functions allow to add functionality to classes without requiring full private access, avoiding hard to maintain monolith classes. Furthermore, it allows extending third party libraries. I know, you can use a static class, but the class name is totally irrelevant, making the client code unnecessarily verbose.

Apparently, the C# team does find it important, as they added the "<em>extension methods</em>" feature to C# 3.0. I think this is a truely great feature, which largely solves the need for freestanding functions. However, in some cases when you have 2 parameters of a different type, it will be hard to decide to which of both types to add the extension method.
