• NULLPTR (unregistered)

    typeof((void*)42-0b101010);

  • Me (unregistered)

    That's a mild WTF in my eyes - It's nothing that a complete rewrite couldn't solve.

  • (nodebb)

    Fixing the root cause is easy. Reach into back pocket, pull out GAU-8, use on the guilty party, job done.

  • negative infinity (unregistered) in reply to NULLPTR

    That's still just a void*.

    Func<object> mkStr = typeProvider.CtorFromInfo(infoFactory.CreateInfo<string>());
    object str = mkStr();
    
  • bvs23bkv33 (unregistered)

    i'm not sure they use "has" prefix in method names consistently

  • Kattman (unregistered)

    Oh I am sure every one of these is initialized first. HasCorporateAccount = null anyone? So again we have a yes, no, and filenotfound.

  • (nodebb) in reply to negative infinity

    That's still just a void*.

    In fact, it's a compile error because it does pointer arithmetic on a void *

  • Pabz (unregistered) in reply to Me

    A rewrite of the code or a rewrite of the person who wrote it? :)

  • Little Bobby Tables (unregistered) in reply to Pabz

    See "Reprogramming with a Cluebat: Advanced Edition".

  • (nodebb) in reply to Me
    That's a mild WTF in my eyes - It's nothing that a complete rewrite couldn't solve.
    I think almost all the WTF entries could be solved with a complete rewrite. It is just a matter of how much has to be rewritten: a function, a class or a project?
  • (nodebb)

    I really love when people do this and then complain that $language is inadequate, faulty, insecure, or otherwise less than useable (but there have been some out there where the actual language is TRWTF).

  • Anonymous') OR 1=1; DROP TABLE wtf; -- (unregistered) in reply to Steve_The_Cynic

    It should be a compiler error according to both the C and C++ language standards, but GCC and Clang allow it by default in C code as a language extension for compatibility with legacy code (tested with GCC 7.4.0 and Clang 6.0.0). For the purposes of pointer arithmetic on void*, they use an object size of 1 byte, i.e. as if it were char*.

    In fact, neither of them so much as issue a warning, even with -Wall -Wextra -std=c99. You need to add -Wpointer-arith (which is included in -pedantic, as well as Clang's -Weverything) to get a warning in C code with GCC or Clang. In C++ mode, both GCC and Clang issue errors, as they should.

    Visual Studio 2017 issues an error in both C and C++ mode as well.

  • BIG BOBBEH TABLES (unregistered)

    is this really a java wtf? there isn't even a FactoryFactory

  • I'm not a robot, honest (unregistered)

    What are these companies that have time for rewrites?

Leave a comment on “What Am I?”

Log In or post as a guest

Replying to comment #:

« Return to Article