• 3 Posts
  • 13 Comments
Joined 1 年前
cake
Cake day: 2023年6月21日

help-circle










  • CatPoop@lemmy.worldtoProgramming@programming.dev...
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 年前

    For my sins I spend a significant part of my time maintaining smalltalk, and it most definitely is not productive.

    The syntax is ugly and cumbersome when you start chaining messages. Any advantages the evangelists tout are available in modern languages without the baggage of this dead one.

    Today if you want something ‘simple, flexible, interactive’ (interpreted, GC and likely faster) python would almost certainly be a better choice.


  • Should have no problems. Couple of things to check on the TV settings menu, make sure the zoom is set to ‘fit’ so that there is no border/overscan, if there is a ‘game’ or ‘low latency’ mode enable it; otherwise turn off all picture enhancements (e.g. LG clear view / image smoothing) as they are no bueno for gaming.





  • I really like nullable types, they can be very effective for writing safer code.

    Sometimes there are good reasons to separate object construction and initialization (e.g. composite / loosely coupled objects, or encapsulation of 3rd party libraries) so there can be properties/fields that do not yet have valid values, and using separate queries for this is error prone.

    I write a lot of communication interfaces for sensors/actuators and if the communication drops, nullables are a good way to represent invalid readings.

    Being able to convey the value and validity in one variable can be more thread-safe and easier to write pure-functions, and show intent.

    I occasionally use a nullable for singleton patterns if I’m not 100% convinced there can never be multiple instances, rather than painting myself into a corner with a static class. e.g.

    public static MyClass Instance => _instance ??= new();
    private static MyClass? _instance;