DEV Community

Discussion on: Sometimes, the elegant implementation is just a function

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

I understand this, but I don't understand that reason why it was done. Why not allow functions at the namespace scope instead?

By overloading the functionality of a class it needlessly confuses its purpose.

Collapse
 
joelnet profile image
JavaScript Joel

C# was created at the peak of OOP mania. Other options weren't as popular. It's one of the reasons why I transitioned from C# to JavaScript.