Remix.run Logo
sampullman 12 hours ago

It might be due to the convenience of familiarity, but I disagree about TS. If you forbid any/unknown it doesn't feel at all like an awkward patch, and as far as I can tell the type system is much more powerful than Swift's.

Zanfa 11 hours ago | parent [-]

The main problem with TS is that your types are compile-time. You can have 0 uses of any/unknown, but you can still stuff a number into a string at runtime without any issues until it blows up.

I know you should have defined validators for every single external API, library and database, but at some level it feels silly to do all of this extra work.

sampullman 11 hours ago | parent [-]

Of course, but that comes with the territory. I just think it's really impressive how far TS has come, and doesn't feel like an "awkward patch over javascript" at all these days.

In new projects, I've found that it's now very rare to come across a library that doesn't provide typings, or violates the interface.