News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by bluGill on Wednesday October 04, 2023 @12:01PM (#37767133)
You should still use name and address as types not strings, even though when you look deep you discover they are both strings. It is [almost?] always an error to mix up name and address fields and the type system can enforce this.
Re:Strong typing, a hill I'm willing to die on by taeric on Wednesday October 04, 2023 @12:33PM (#37767649)
This is why I said it will be an ROI of where you are. In your javascript just pulling the data out of form fields to send to the backend? Probably not worth it. Somewhere between taking it from the user and processing it? Probably worth it. And sending it to another system? You almost certainly need a translation between your types and theirs. But making a layer that converts between every one of your types to every possible external system? Probably not worth it.