News for hackers. Stuff that matters.
Re:On the evolution of programming style: How far C++ has mo... by marshray on Monday March 26, 2012 @06:45PM (#3759004)
Thanks for that info. Anyone know if C# has something similar?

From the linked docs: So when should you use static import? Very sparingly!

To me, it sort of confirms the point that these inelegant features are necessary because the language doesn't support fundamental primitives like plain functions and named constants without a superfluous object definition.

Re:On the evolution of programming style: How far C++ has mo... by pauldino on Tuesday March 27, 2012 @12:44AM (#3760054)
The CLI itself actually supports unadorned functions, but C# doesn't provide a way of writing them, or using directly them without resorting to reflection. I'm pretty sure C++/CLI lets you use and write standalone functions in managed code, and come to think of it I imagine F# would too. Also it's not an exact equivalent, but C# extension methods can often be used instead of static methods.
Re:On the evolution of programming style: How far C++ has mo... by atesti on Wednesday March 28, 2012 @06:14PM (#3768643)
You can mark a class as static, then it will only allow static functions or members:

static class Math { static int Pow(int a,int b) {...} }