• ShatteredArm (unregistered)

    TDWTF: Where factory.getInstance().getInstance().getInstanceFactory().getInstance().getInstanceFactory().getOrderFactory().getInstance().getInstanceFactory() compiles.

  • Factory Master (unregistered) in reply to Remy Porter

    Yo dawg, we heard you like factories so we built a factory to return a factory so you can instantiate while you instantiate

  • Factory Master (unregistered) in reply to Factory Master

    Oh, someone fristed me on the yo dawg.

    captcha: ludus

  • Honnza (unregistered) in reply to ShatteredArm
    ShatteredArm:
    TDWTF: Where factory.getInstance().getInstance().getInstanceFactory().getInstance().getInstanceFactory().getOrderFactory().getInstance().getInstanceFactory() compiles.

    It is valid JavaScript (and TypeScript, which compiles to JavaScript).

    The fact that it most likely throws a TypeError is irrelevant. It still compiles.

  • ab (unregistered) in reply to @CodeBeater
    Zecc:
    @CodeBeater:
    Boss:"Can you make it simpler?" "Sure!"

    function createFactorySimple() { public IInstanceFactory getInstanceFactory();
    public IInstanceFactory getInstance();
    public IInstanceFactory getOrderFactory();
    public IInstanceFactory getGroupFactory();
    public IInstanceFactory getUserFactory();
    }

    Weird syntax you got there.
    I don't know Java, so I'm not sure what "Boss:" does, but I assume it's a valid control statement that Python just doesn't have.

    Anyway, according to PEP 8, you should never inline code after the colon; put the rest of the block on a new line, with proper indentation. Also, docstrings should be in triple-quotes, and not rely on string concatenation. So:

    Boss:
        """Can you make it simpler?
        Sure!"""
        # rest of your code goes here
    
  • SmeckleTickle (unregistered)

    "The Factory pattern is an excellent way to solve a variety of programming problems using an object-oriented language."

    No. No, it is not.

Leave a comment on “IInceptionFactory”

Log In or post as a guest

Replying to comment #:

« Return to Article