Note that there are some explanatory texts on larger screens.

plurals
  1. PONamespace + functions versus static methods on a class
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. COfor one thing, namespaces are more recent addition to the language, compared to classes and static methods, which were in the language from the time it was called "C with classes". Some programmers may be more comfortable with older features. Some other programmers may be using old compilers. Just my $.02
      singulars
    2. CO@Rom: You're right about "old programmers", but wrong about "old compilers". Namespaces are correctly compiled since eons (I worked with them with Visual C++ 6, dating from 1998!). As for the "C with classes", some people in this forum weren't even born when that happened: Using this as an argument to avoid a standard and widespread C++ feature is a fallacy. In conclusion, only obsolete C++ compilers don't support namespaces. Don't use that argument as an excuse to not use them.
      singulars
    3. CO@paercebal: some ancient compilers are still in use in embedded world. Not supporting namespaces is probably one of the smallest inconveniences one needs to put up with while writing code for various small CPUs which everyone interacts with every day: your stereo, your microwave, engine control unit in your car, traffic light, etc. Just to be clear: I'm not advocating for not using a better, newer compilers everywhere. Au conrare: I'm all for newest language features (except RTTI ;) ). I'm just pointing out that such a tendency exists
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload