• 0 Posts
  • 24 Comments
Joined 1 year ago
cake
Cake day: September 24th, 2023

help-circle















  • The classic “I had it hard so you should too” mentality. I think it fundamentally comes from an animal desire for fairness - it isn’t fair that these old geezers had to put up with C shooting them in the feet at the drop of a bracket, while the new kids on the block get friendly (usually) compiler errors instead.

    But I think if you don’t recognise that instinct in yourself and overcome it then you have failed as a human.

    I’ll always remember the pushback to making xfree86 easier to configure (yes I’m old). Back in the day you had to edit a stupid text file to tell X that your screen could display 1024x768 and your mouse had three buttons. Then some upstarts came along and make it automatically detect that. The absolute cheek! Our ancestors have been practicing xfree86config since before you were a wee bebe! Etc. etc.

    It’s a human condition.



  • Yeah the main reason is performance. In some languages if you use a value “linearly” (i.e. there’s only ever one copy) then functional style updates can get transformed to mutable in-place updates under the hood, but usually it’s seen as a performance optimisation, whereas you often want a performance guarantee.

    Koka is kind of an exception, but even there they say:

    Note. FBIP is still active research. In particular we’d like to add ways to add annotations to ensure reuse is taking place.

    From that point of view it’s quite similar to tail recursion. It’s often viewed as an optional optimisation but often you want it to be guaranteed so some languages have a keyword like become to do that.

    Also it’s sometimes easier to write code that uses mutation. It doesn’t always make code icky and hard to debug. I’d say it’s more of a very mild code smell. A code musk, if you like.