8
QCat
8y

C#: inner classes, inner classes everywhere
C++: inline and C everywhere

Comments
  • 1
    What's the idea of an inner class?
  • 2
    @Mitiko it's a class defined in another class which act as the namespace of the inner one

    public class A
    {
    public class B
    {
    int n;
    }
    }
  • 0
    @QCat I didn't know it was called so. Thanks!😀
  • 0
    Inline is a great thing when needed to optimize. But C in C++ is more like using C with convenience extensions, I wouldn't name it C++..
  • 2
    @matanl well I mostly use C to code parsers and evaluators, using only C++11 synchronization, then I wrap the whole stuff in a nice C++11 class.
    I gain a nice amount of speed and keep a thread safe interpreter with a readable interface. Best of both worlds. Then I make the rest right in C++11 or C++14 (GCC 6)
  • 2
    @matanl but I like the C API, and use plenty of pure C libraries that I refuse myself to wrap
Add Comment