• 4 Posts
  • 481 Comments
Joined 11 months ago
cake
Cake day: July 31st, 2023

help-circle

















  • To offer a differing opinion, why is null helpful at all?

    If you have data that may be empty, it’s better to explicitly represent that possibility with an Optional<T> generic type. This makes the API more clear, and if implicit null isn’t allowed by the language, prevents someone from passing null where a value is expected.

    Or if it’s uninitialized, the data can be stored as Partial<T>, where all the fields are Optional<U>. If the type system was nominal, it would ensure that the uninitialized or partially-initialized type can’t be accidentally used where T is expected since Partial<T> != T. When the object is finally ready, have a function to convert it from Partial<T> into T.



  • It seems pretty obvious to me at this point that the DNC would rather lose than have an actual progressive win.

    It’s not in their interests to let a progressive win. Just like their counterpart, the DNC takes a shit ton of bribery donations from corporations lobbyists. Bringing in a progressive who would reform the system or push back against pro-corporate policies is biting the hands that feed them.