Car car = new Car();

Car car = new Car();

POSIWID: The Purpose Of A System Is What It Does Shirt $21.68

The Kind of Tired That Sleep Won’t Fix Shirt $21.68

POSIWID: The Purpose Of A System Is What It Does Shirt $21.68

  1. 1 month ago
    Anonymous

    class OP extends homosexual{}

    • 1 month ago
      Anonymous

      It's really annoying how "extends" in programming means exactly the opposite of what it means.
      A class is a concept. To extend a concept is to allow more instances to fall under it. Extending a class restricts the instances falling under it.

      • 1 month ago
        Anonymous

        that's why in C++ it's just ":" and in spoken word it's called inheritance, a more concrete class has ancestor as more abstract class that matches it, Java is just moronic

      • 1 month ago
        Anonymous

        To extend a concept means to keep the original and add stuff to it homie

        • 1 month ago
          Anonymous

          Exactly, and the stuff is the instances of the class. In mathematics, by the axiom of extensionality, a class is defined by its instances.

          • 1 month ago
            Anonymous

            >the stuff is the instances of the class
            Extension does not mean disjointed union, that would be an interface

          • 1 month ago
            Anonymous

            Nobody mentioned a disjointed union. Learn to read.

          • 1 month ago
            Anonymous

            A subclass is defined both by the class it inherits from and the stuff it adds to it, not just the latter

          • 1 month ago
            Anonymous

            In mathematics and philosophy and life, a class A extends a class B if it has all the elements of A.
            In java, a class A "extends" a class B if B has all the elements of A.

          • 1 month ago
            Anonymous

            >In java, a class A "extends" a class B if B has all the elements of A.
            Wtf are you smoking

          • 1 month ago
            Anonymous

            A extends B in java <=> x in A implies x in B, means B has all the same elements and more, means B actually extends A.

          • 1 month ago
            Anonymous

            You are getting it backwards homie, I don't even know where the frick you got this from

          • 1 month ago
            Anonymous

            Just read what I wrote again. Everything I said is logical and 100% makes sense.
            You are just confused or dumb.

          • 1 month ago
            Anonymous

            You are literally getting it backwards you fricking braindead pseud

            A extends B in java <=> x in B implies x in A

          • 1 month ago
            Anonymous

            Oh my god you are moronic. It's literally the opposite. Have you never coded in java?

          • 1 month ago
            Anonymous

            class B {
            public int x = 10;
            }

            class A extends B {
            public int y = 20;
            }

            public static void main(){
            A a = new A();
            System.out.println(a.x);
            }

            By your moronic logic a.x shouldn't exist

          • 1 month ago
            Anonymous

            a.x exists be cause B extends A, you idiot. That's what it means to be a bigger class: all members of A are also members of B, and all members of B have property x, so all members of A also have property x, because B is a BIGGER class that EXTENDS A.

            public B b = new B();
            System.out.println(b.y);
            According to you, this should work. Fricking moron.

          • 1 month ago
            Anonymous

            >According to you, this should work
            No lmao

            So let me get this straight: if according to you B is the bigger class then what additional elements does it have? Surely not y

          • 1 month ago
            Anonymous

            B b = new B();

            B has the element b but A doesn't have the element b, because A is a smaller class than B. This is elementary. I don't understand how you can be so moronic.

          • 1 month ago
            Anonymous

            >mixing up types, classes and sets of elements to mud the waters

          • 1 month ago
            Anonymous

            It doesn't matter which term you use in this context. The point still stands.

          • 1 month ago
            Anonymous

            Ok Black person this is my last reply

            The TYPE modeled by CLASS B contains all the elements of the TYPE modeled by CLASS A and then some, meaning that the TYPE modeled by CLASS B is a bigger set than the TYPE modeled by class A.

            An INSTANCE of the CLASS A contains all the elements of an INSTANCE of the CLASS B and then some, meaning that an INSTANCE of the CLASS A is a bigger set than the INSTANCE of the CLASS B

            Terms matter and you are a pseud Black person

          • 1 month ago
            Anonymous

            >The TYPE modeled by CLASS B contains all the elements of the TYPE modeled by CLASS A and then some, meaning that the TYPE modeled by CLASS B is a bigger set than the TYPE modeled by class A
            This is literally what I said. Also you could remove the "type modeled by", it would mean the exact same thing.
            > An INSTANCE of the CLASS A contains all the elements
            An instance is an element. Wtf did you think an element of a class/type was?

          • 1 month ago
            Anonymous

            An object contains fields, which in turn can be other objects. Thus an object is itself a set of sets.

          • 1 month ago
            Anonymous

            Doesn't address my point.

          • 1 month ago
            Anonymous

            A extends B in java <=> x in A implies x in B, means B has all the same elements and more, means B actually extends A.

            In mathematics and philosophy and life, a class A extends a class B if it has all the elements of A.
            In java, a class A "extends" a class B if B has all the elements of A.

            Is this an elaborate shitpost? If so, congrats on the (you)s.

          • 1 month ago
            Anonymous

            >

          • 1 month ago
            Anonymous

            You are literally getting it backwards you fricking braindead pseud

            A extends B in java <=> x in B implies x in A

            >doesn't understand polymorphism
            many such street shitters, sad!

            >he doesn't understand covariance and contravariance
            Sorry buddy, that's not how class inheritance works.

      • 1 month ago
        Anonymous

        >he doesn't understand covariance and contravariance
        Sorry buddy, that's not how class inheritance works.

      • 1 month ago
        Anonymous

        >doesn't understand polymorphism
        many such street shitters, sad!

        • 1 month ago
          Anonymous

          >he doesn't understand covariance and contravariance
          Sorry buddy, that's not how class inheritance works.

          Not an argument.

  2. 1 month ago
    Anonymous

    i dont get it

    • 1 month ago
      Anonymous

      then get off DA

      • 1 month ago
        Anonymous

        i thought this was the tech consumerism board, not the programming board

    • 1 month ago
      Anonymous

      i dont want to

  3. 1 month ago
    Anonymous

    public class Vehicle : Idrivable, ICrashable, ICanHaveSexInAble, INewtonianSolid
    protected class Car : Vehicle, ISteerable, IBluetoothConnectable, ICar
    Car car = VehicleFactory.NewInstanceOfType<ICar, ISteerable>(make = "Fodr", model = "Corolla");

    FTFY. Next time don't be so lazy with your domain modeling. A proper object oriented hierarchy is crucial for success in the modern enterprise environment.

    • 1 month ago
      Anonymous

      I can still understand it so it's not OOP and enterprise enough

    • 1 month ago
      Anonymous

      should not Vehicle be abstract?

    • 1 month ago
      Anonymous

      >ICanHaveSexInAble
      This should be YouCanHaveSexInAble

      • 1 month ago
        Anonymous

        Inheritance is identity moran

    • 1 month ago
      Anonymous

      all of this and it doesn't even prevent you from creating a Ford Corolla lol

  4. 1 month ago
    Anonymous

    var c = new Car();

    Use that thinking you're smart then regret it on large codebase.

    • 1 month ago
      Anonymous

      car = Car()
      what's the problem?

      • 1 month ago
        Anonymous

        how does the compiler know if you are referring to a new or old car tho

  5. 1 month ago
    Anonymous

    `Vehicle car = Car.new(new CarTire[]{new CarTire() .... })`

    - Well used Interfaces
    - Factory methods
    - A thing shouldn't have to create its dependencies, it should be given them (dependency injection)

    • 1 month ago
      Anonymous

      Vehicle car = Car.new(new CarTire[]{new CarTire() .... })

      code tag tongue my anus

  6. 1 month ago
    Anonymous

    rate my car saars
    interface Car {
    void drive();
    }

    class BasicCar implements Car {
    @Override
    public void drive() {
    System.out.println("driving");
    }
    }

    interface CarFactory {
    Car createCar();
    }

    class BasicCarFactory implements CarFactory {
    @Override
    public Car createCar() {
    return new BasicCar();
    }
    }

    public class Main {
    public static void main(String[] args) {
    CarFactory carFactory = new BasicCarFactory();
    Car car = carFactory.createCar();
    car.drive();
    }
    }

    • 1 month ago
      Anonymous

      don't stutter, if you already have CarFactory, you can simply name the method "create()"

    • 1 month ago
      Anonymous

      Why is enterprise quality code so repulsive? I know it's supposed to make everything an object to increase code reuse but it's just so disgusting for some reason

  7. 1 month ago
    Anonymous

    let car = Car::new();

  8. 1 month ago
    Anonymous

    All the fricking POO examples are like that, Animal Class, Monster Class, Vehicle Class, fricking moronic examples. I never understood POO because of this and having a 34IQ

    • 1 month ago
      Anonymous

      OOP came up when the israelites realized that the advent of the Internet meant Infinite money, because they could have the glorious shabbos goy white engineer from the North send the UML to the shitskins to code for pennies on the dollar.

      It obeys to no real directive other than to prove your compliance. A programmer's mind has never worked that way. A programmer's mind will produce C/Cpp style code. Java style code is, instead, solely intended to prove that you're a well-read, textbook abiding golem of the israelites, that you're down with the clown, that you obey your programming.

      • 1 month ago
        Anonymous

        Stop larping you fricking Black person

    • 1 month ago
      Anonymous

      OOP the way it is normally used, is completely gay and moronic, polymorphism should only be used sparingly in really high level constructs

  9. 1 month ago
    Anonymous

    car.car.cardoor.siding.knob.window.up=false;

  10. 1 month ago
    Anonymous

    Frog frog = new Frog();

  11. 1 month ago
    Anonymous

    New old = new Old();

  12. 1 month ago
    Anonymous

    Tesla tesla = new VehicleFactory().getCarFactory().buildTestla().implementation().build();

    good morning sirs

    • 1 month ago
      Anonymous

      VehicleFactory factory = VehicleFactories.carFactory();
      Tesla tesla = factory.createDefault(Tesla.class);
      tesla.start().join();

  13. 1 month ago
    Anonymous

    data Car = Car
    car = Car

  14. 1 month ago
    Anonymous

    Car car{};

    • 1 month ago
      Anonymous

      gcc/libstdc++

  15. 1 month ago
    Anonymous

    var car = new Car();
    Car car = new();

    Or, my personal favorite:

    var car = new();

  16. 1 month ago
    Anonymous

    can I just not use classes ever? like I understand the utter basics of programming with C++ and a few other languages but just fail to ever see the utility of classes.

    genuine question, even if it sounds like moronic bait.

    • 1 month ago
      Anonymous

      yes you can, cniles reinvent whole OOP from scratch and even when they do it, they still have no classes, and it works

    • 1 month ago
      Anonymous

      Of course. I have been mostly doing that. You can use structs/dicts/objects.
      There is a few situations where they are neat, usually when making a game, but they are completely optional.

    • 1 month ago
      Anonymous

      yes. I never use classes

    • 1 month ago
      Anonymous

      Have you never written a large program before?
      Do you put everything in one file or something?
      JavaScript dev?

  17. 1 month ago
    Anonymous

    Why does Java suck the joy out of programming?

  18. 1 month ago
    Anonymous

    >auto car = new Car();

    • 1 month ago
      Anonymous

      NOOOO SAR THAT WILL LEAK MEMORY, SAR DO NOT REDEEM AND REMEMBER TO delete, OKAY?!

    • 1 month ago
      Anonymous

      >auto mobile = new Car();

      • 1 month ago
        Anonymous
      • 1 month ago
        Anonymous

        https://i.imgur.com/yMd8Q2D.jpeg

        >auto car = new Car();

        >car* car = new car{};

        • 1 month ago
          Anonymous

          >car car = car Car();

          • 1 month ago
            Anonymous

            >#define cAr =
            >#define caR new
            >#define CAr {
            >#define cAR }
            >#define Car ;
            >#define CAR *
            >car CAR car cAr caR car CAr cAR Car

      • 1 month ago
        Anonymous

        heheh

    • 1 month ago
      Anonymous

      Should be
      auto car = std::make_unique<Car>();

      • 1 month ago
        Anonymous

        c++ is a disease

        • 1 month ago
          Anonymous

          i'd say that too if i got filtered by it

      • 1 month ago
        Anonymous

        Good day sir

        • 1 month ago
          Anonymous

          sirs would use ::New() thoughever

    • 1 month ago
      Anonymous

      manual car = new Car();

  19. 1 month ago
    Anonymous

    Car car = new();

    • 1 month ago
      Anonymous

      C# gods won

  20. 1 month ago
    Anonymous

    struct Car {
    make: String,
    model: String,
    year: u32,
    }

    impl Car {
    fn new(make: String, model: String, year: u32) -> Car {
    Car { make, model, year }
    }

    fn drive(&self) {
    println!("{} {} is driving.", self.make, self.model);
    }
    }

    • 1 month ago
      Anonymous

      post hair colour

      • 1 month ago
        Anonymous

        It's black. I'm black.

  21. 1 month ago
    Anonymous

    >classes
    >objects
    >methods
    >properties
    >or are they attributes
    >this is not CSS
    >extends this dick
    >implements this dick
    ><this dick>

    • 1 month ago
      Anonymous

      >"Amidst the allure of simplicity, don't mistake complexity for incompetence. While it's easy to dismiss intricate systems as flawed, true brilliance lies in discerning when complexity serves a purpose. beware of praising simplicity blindly, for in the realm of intellect, it's the mastery of intricacies that truly distinguishes the brilliant from the mundane."

      • 1 month ago
        Anonymous

        >my spaghetti code is an elegant silk weave where every knot serves a purpose, yours is an abstract obfuscation made only to complicate the simplest of problems

        I just need a simple structure to hold pertinent information for vehicles, an over-engineered encapsulation method for an abstract data type just makes you sound like an ass.

  22. 1 month ago
    Anonymous

    In languages where type also serves as the variable declaration keyword you can't have type inference, hence this garbolini

    Compare with TypeScript:
    const car = new Car;

    C# cucks how do u tolerate this

    • 1 month ago
      Anonymous

      C# has Car car = new();

    • 1 month ago
      Anonymous

      >TypeScript
      >it's just JavaScript but with extra layers of bloat and pretension
      I'm just not going to listen to someone's opinion on languages when they promote that moronic gay shit.

      • 1 month ago
        Anonymous

        Yep. It doesn't do anything, it's just extra bloat you have to type so the compiler can protect you from rookie mistakes

        • 1 month ago
          Anonymous

          yep, ts is just a linter, the types are fake
          have to use it at work though because there's lots of morons

    • 1 month ago
      Anonymous

      or you just use a dummy keyword in place of the type, stupid

    • 1 month ago
      Anonymous

      You can also just use the variable declaration keyword if you want in C#.
      var car = new car();
      The reason you would want to use the type is to define the type of the reference to your object.
      class Op : homosexual{}
      homosexual op = new Op();

  23. 1 month ago
    Anonymous

    import car
    car.run()

  24. 1 month ago
    Anonymous

    >oop in a statically typed language
    ngmi

  25. 1 month ago
    Anonymous

    in c# it's now just Car car = new();
    You don't need to say what it is again after the =

  26. 1 month ago
    Anonymous

    QUICK!
    car(Car car) {
    car = Car();
    }

  27. 1 month ago
    Anonymous

    aCar := Car new

    • 1 month ago
      Anonymous

      >using dick assignment

  28. 1 month ago
    Anonymous

    car = Car.new()

    • 1 month ago
      Anonymous

      let car = Car::new()

      • 1 month ago
        Anonymous

        local car = Car:new()

  29. 1 month ago
    Anonymous
  30. 1 month ago
    Anonymous

    car1, car2 = [Car(x) for x in ['Chevrolet', 'GMC']]

    • 1 month ago
      Anonymous

      this is based and most comfy
      pythonchads win again!

      • 1 month ago
        Anonymous

        undoubtedly!!

      • 1 month ago
        Anonymous

        Pyjeet

  31. 1 month ago
    Anonymous

    or, the mature and fair complexion way

    std::unique_ptr<Car> car = std::make_unique<Car>();

    • 1 month ago
      Anonymous

      Just do
      >Car car;

      • 1 month ago
        Anonymous

        i said
        >fair complexion

    • 1 month ago
      Anonymous

      struct Car *car = malloc(sizeof(struct Car));

      • 1 month ago
        Anonymous

        This. all this nocoder seething about classes kek. if you really think you write decent code without classes, post it so we can laugh. its all cnile shit where you have to do this, which is 10x worse than op's example, which isnt even a real example because most langs have a variable declaration that has type inference

        • 1 month ago
          Anonymous

          int buf[128];
          vs
          int [] buf = new int[128];

  32. 1 month ago
    Anonymous

    declare -a carMake
    declare -a careModel
    declare -a carYear

    createCar ()
    {
    carMake+=($1)
    carModel+=($2)
    carYear+=($3)
    }

    car=$(createCar "Renault" "Twingo" "1997")

  33. 1 month ago
    Anonymous

    This drove me up a wall, but it ultimately makes sense when you understand how C# works.

    You're basically creating a variable car, of the object type of Car. Meaning, you have the blueprints called Car, and you have a box that will ultimately hold the car. You now put in an order to the factory with the = that you want a new Object that is the Car object itself.

    You can always rewrite this for clarity like:
    Car itsABrandNewCar = new Car()

    • 1 month ago
      Anonymous

      This this type of wordage I want confetti and fanfare to play while I guess the MSRP.

  34. 1 month ago
    Anonymous

    maloc(100)

    • 1 month ago
      Anonymous

      Funniest post

  35. 1 month ago
    Anonymous

    Stand bloody back sirts. authentic cnile code no pooooooop here from mario 64

    /**
    * Puts Mario into a given action, putting Mario through the appropriate
    * specific function if needed.
    */
    u32 set_mario_action(struct MarioState *m, u32 action, u32 actionArg) {
    switch (action & ACT_GROUP_MASK) {
    case ACT_GROUP_MOVING:
    action = set_mario_action_moving(m, action, actionArg);
    break;

    case ACT_GROUP_AIRBORNE:
    action = set_mario_action_airborne(m, action, actionArg);
    break;

    case ACT_GROUP_SUBMERGED:
    action = set_mario_action_submerged(m, action, actionArg);
    break;

    case ACT_GROUP_CUTSCENE:
    action = set_mario_action_cutscene(m, action, actionArg);
    break;
    }

    // Resets the sound played flags, meaning Mario can play those sound types again.
    m->flags &= ~(MARIO_ACTION_SOUND_PLAYED | MARIO_MARIO_SOUND_PLAYED);

    if (!(m->action & ACT_FLAG_AIR)) {
    m->flags &= ~MARIO_UNKNOWN_18;
    }

    // Initialize the action information.
    m->prevAction = m->action;
    m->action = action;
    m->actionArg = actionArg;
    m->actionState = 0;
    m->actionTimer = 0;

    return TRUE;
    }

    >has oop anyway
    >bitmasking for booleans
    the power of cniles whoaaaaa...... time to throw away 50 years of language improvements for this

Your email address will not be published. Required fields are marked *