News for hackers. Stuff that matters.
Re:The use of ‘class’ for things that should be simple free ... by wruza on Sunday May 29, 2022 @05:42AM (#31547826)
Some say it should be in a test.
Re:The use of ‘class’ for things that should be simple free ... by mojuba on Sunday May 29, 2022 @05:59AM (#31547905)

  assert(INT_1 == 1);
Gotcha.
Re:The use of ‘class’ for things that should be simple free ... by zelphirkalt on Sunday May 29, 2022 @10:12AM (#31549278)
What? You are going to use a global state for this? No, no, no! You ought to put that in a class ...

    class MyBetterrrrInteger(MyCustomNumberClass) implements ICalculatable {
      public static MyBetterrrrInteger(OtherIntegerClass num) {
        ...
        // oh did I forget to add generics to the mix? damn.
      }
    
      ...
    }