3 ms·
> My errors are never type related Over the years I feel like I have read this comment at least ten times from different commenters (and the second time this m
by JoeyJoJoJr 2y ago
> My errors are never type related
Over the years I feel like I have read this comment at least ten times from different commenters (and the second time this month) and I cannot really fathom it. I consider myself a pretty good developer, and I have type errors many times a day. It is perhaps the most common error I encounter, and thankfully one of of easiest to fix with static typing.
By far the biggest recent productivity gain I have made using types is by generating the types along with client code for APIs via a swagger doc. I cannot overstate the value in seeing the types update when the backend devs have changed the API, and getting a compiler error when it doesn’t match with your code. By having the types the next developer after me is going to be spending far less time getting up to speed with the codebase.
I started programming with static types early in my career so perhaps I have become wired to lean heavily on the type system.
- archerx 2y agoMy first programming language was C/C++ and I learned dynamically typed languages after, I still prefer the dynamically type languages. I still do a lot of C/C++ code for micro controllers and the types are so annoying, either create a function for both ints and floats, templates or you cast the type. It's all so tedious, boring and uninteresting. I have made a lot of code that works on a lot of third party APIs (The major LLMS, Image generators, E-commerce stuff) and yea it's all been easy breezy and never thought I wish I had types. Different people just work in different ways.