• 0 Posts
  • 12 Comments
Joined 3 years ago
cake
Cake day: June 20th, 2023

help-circle





  • Javascript’s type coercion is rather insane, yes, but there is an actual, practical reason it’s done. JS, having been designed to be run in web browsers, wants to avoid blowing up and crashing at all costs. If it gets an unusual type comparison, usually the result of a bug, it tries to return something, such that the script can continue running if at all possible. In JS’ mentality, keeping a page running, even if it might not completely function properly, is preferable to throwing an unhandled exception and completely crashing it.

    Whether or not that is the right approach is debatable, but there is at least some logic to it. Personally, I think that the proliferation of Node letting JS run outside of browsers exacerbates a lot of JS’ issues, but TypeScript does a lot to make it look like a more sensible language.




  • Let’s leave the conspiracy theories to the far-right lunatics, please. The attempt killed an innocent bystander and the shooter was a right-winger. Even if they were cynical enough to stage the first part on purpose (and honestly, I wouldn’t put it past them), the shooter being one of their own completely undermines the entire point of staging something like that to begin with.

    Besides, this administration is way too incompetent to keep a secret. With the way Trump has been blundering his way through the Epstein accusations, do you really think he could keep his mouth shut about staging an assassination attempt?





  • jedibob5@lemmy.worldtoProgrammer Humor@lemmy.ml•Before and after programming
    link
    fedilink
    English
    arrow-up
    77
    arrow-down
    1
    ·
    2 years ago

    The whitespace doesn’t bother me. Any IDE worth a damn will manage that for you. As for the type system, yeah, I strongly prefer static typing, but for simpler projects I can see the convenience of it.

    My real issue with Python comes with managing a development environment when multiple developers are working on it. Dependency management in Python is a headache, and while in theory, virtual envs should help with synchronizing environments from machine to machine, I still find it endlessly fiddly with a bunch of things that can go wrong that are hard to diagnose.

    Python is great for small scripts, proofs-of-concept, and such, but I wouldn’t write anything more heavy-duty than that in it.