using too much static bad or good?

i like to use static functions in c++ as a way to categorize them, like c# does.

Console::WriteLine("hello")

but is it good or bad ? if the functions are often used i guess it doesn't matter, but if not do they put pressure on memory ?

The same goes for static const...

Answers


but is it good or bad

The first adjective that comes to mind is "unnecessary". C++ has free functions and namespaces, so why would you need to make them static functions in a class?

The use of static methods in uninstantiable classes in C# and Java is a workaround because those languages don't have free functions (that is, functions that reside directly in the namespace, rather than as part of a class). C++ doesn't have that flaw. Just use a namespace.


Need Your Help

Catching exceptions

c# .net exception exception-handling try-catch

In the following chunk of code the new constructor is documented to throw seven different exception types, including System.IO.PathTooLongException and System.ArgumentException,

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.