I think, especially in programming language communities, that there tends to be a preference towards making a static language for their compile time guarantees, and this is a pretty concrete counterargument as to why people find dynamic languages “easier to program in”

  • philluminati@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Very long and a little bit of tricky read but certainly interesting observations. As a Scala developer I actually see the problem with static vs dynamic code all the time. A desire to force everything into the static type system so errors are found early is commemerable, but even in places it doesn’t necessarily make sense. A common example is taking user input and shoving it in a cats NonEmptyList. A type which exists soley so that calling .head won’t cause an exception. Apparently using .headOption is a deal breaker. The other place is the desire to serialise classes into json structures automatically. This is again commendable and makes programming much easier in some constraints, but it then remanifests as a problem when you realise that internal types and external types need to diverge in some way. At runtime it’s easy to change mappings between two arbitrary structures and you can inspect the data, but trying to do it via the limited language exposed by a macro is painful.