9
DirtEffect
101d

Imagine you have a car and it runs faster than other cars and needs less gasoline, but due to historical reasons the steering wheel is made of barbed wire, there's 8 different accelerator pedals for different streets, pushing the wrong one may lead to a crash, and instead of a driver's seat there's a huge wooden dildo sticking out of the floor.

This is, in a nutshell, what using the C++ type system feels like.

Comments
  • 4
    Can't imagine because TÜV
  • 3
    @Alice OMG I'd love to see a TÜV certification for programming languages. Germans, please make that happen!
  • 2
    Yup. That’s an accurate description.
  • 4
    One of the 8 pedals is actually a foot gun.
  • 2
    @DirtEffect they do certify software tools like compilers, because of course they do. How else could they certify a system that is software controlled?
  • 1
    What's wrong with the type system?
  • 1
    @Lensflare Made me laugh out loud :)
  • 3
    @retoor It is attempting to combine expressivity, performance, and downward compatibility. This is a worthy goal in principle, but since compatiblity is a must and performance its main selling point, the expressivity suffers and suffers greatly.

    Take the rvalue reference args for instance:

    void foo(A &&v); //Matches only rvalues

    template<typename T>

    void foo (A<T> &&v); // Matches only rvalues

    template<typename T>

    void foo (T &&v);

    // Matches fucking anything from values, through pointers to Bjarne Stroustrup's balls.
  • 3
    @retoor Or take polymorphism with strings:

    void foo(const std::string &name);

    void foo (int i);

    ...

    foo("Hello world!");

    Wanna guess which overload is called?

    Of course its the int, because it is easier to convert a const char * to int than to std::string
  • 0
    Last example is sick
  • 1
    @DirtEffect lol, I must be a shitty c++ dev. I had to look up what && does. Have not needed to use it before. Kinda cool what it does though:

    https://stackoverflow.com/questions...

    Our code base is older, but this is c++11 stuff. So it has been around for a while.
Add Comment