3 ms·
There are so many benefits for a front end application (written in javascript) to just assume it will be the backend that does type validation. A new field col
by andrewclunn 3y ago
There are so many benefits for a front end application (written in javascript) to just assume it will be the backend that does type validation. A new field column added to a table? Cool, update the api layer, but the javascript just gets "the object" and now you have access to it immediately. No need to duplicate your definitions in both code bases, and it's not like front end security is real anyways. Sounds to me like a lot of "I learned to code in some derivative of C" programmers couldn't possibly consider that different languages could be optimized for different use cases and just want all coding to be "what they're used to." Then they moralize it and use shaming language to push it on everyone else. F typescript. I use different languages for different things, and strong typing makes a ton of sense IN MOST INSTANCES, but certainly not all.
- BigJono 3y agoPeople are conflating too many ideas. You're right that there's a huge benefit to that, but it's contigent on you as the dev being able to trust the types coming into your system, you need good docs, and attention to detail as you code. All the TS devs just conflate JS with "no types" and picture drooling idiots that make random changes without knowing the type of anything (probably because that's what they do without 50 IDE popups to guide them). You're never going to convince them of the values of dynamic typing because they have a different mental model of it in their head.