[–] 8 points 6 days ago (4 children)

We use typescript and try very hard not to return any... But 95% of out back ends api returns are type bob: Type || undefined

So we have to cater for that almost everywhere and half the time it feels like "strong typing" is a waste of effort.

But I still prefer the relative certainty of typescript

  • source
  • parent
  • context
  • [–] 28 points 6 days ago (1 child)

    Unlike traditional types such as string, number, or even JavaScript's dangerously permissive any, an ambiguous variable can contain any value, several values, or no value at all, depending on execution context, compiler mood, and whether anyone is currently debugging it.

    It's different than loosely typed vars, which are not at all exclusive to Javascript

  • source
  • parent
  • context
  • view more: ‹ prev next ›