6
hinst
2y

Not gonna lie; having both != == and !== and === in JavaScript is one of the most stupid bad design moments; in my opinion.

I am not even going to bother trying to come up with a better syntax for that. I will never get over how bad it is. So bad. === is 🤡

Comments
  • 5
    I agree.

    Objects should implement their own comparators for truthy/falsy values.

    Honestly, ‘.empty?’ would cover most of these: [] {} “”
  • 3
    @Root except "truthiness" of objects and arrays is not based on whether or not they're empty. `!= null` would cover those.
  • 0
    @localpost Yeah, I know. JS is a mess.
  • 2
    What do you expect from language that was written in 10 days?

    not much!
  • 1
    In PHP is even worse.
  • 0
    It's a symptom of the insanity inherent in JS rather than a bad idea in itself, I guess. I've never really had much cause to use the strict comparators outside of a linter reprimand, you just get used to working around JS's uh 'type system'
  • 1
    JavaScript and css have a lot of gotcha stupid rules that I tend to forget. You have to (sadly) commit a lot of these dumb rules to memory
  • 1
    JS board meeting: Make sure you add extra simbols in the syntax. Developers love that shit!
Add Comment