@vikasreddy Yeah, sorry, I explained this poorly. You're right that *using* the type is easy.
The hard part is designing complicated types (& then adjusting it as the program changes).
I'm no Typescript expert, but here's the tweet I was thinking of
https://t.co/hfw7QjLLNr
@vikasreddy Again, very anecdotally, but I would guess that fewer than 5% of the bugs that make it to production in our app would have been caught by static typing. A 5% reduction would be nice! But I'm it depends on how much time we'd spend writing/maintaining types
@vikasreddy 3. At least the last time I looked, there still isn't evidence that static types reduce bugs or reduce getting code to production. Yes, programming studies are very hard to do, but given the supposed enormous benefit here, you'd think we'd be able to repeatedly detect the effects
@vikasreddy I'd also like type systems that behave more like linters, which do a bunch of work and bring my attention to likely mistakes, but I can choose to ignore (depending on the code or my context)
@vikasreddy My general feeling is that static types are not bad, just over applied.
I'd like to be able to dynamically type my entire program when I'm figuring out what I want to do, then add types to riskiest parts of program (or parts that would benefit from perf boost).
@vikasreddy In those domains, getting the logic right (i.e. solving the core business problem) was of higher value than getting the types to line up throughout the course of many experiments.
@vikasreddy There are many domains where I'd rather be able to try hundreds of experiments throughout the day instead of spending time getting the entire program to compile (both programmer time and compiler time).
@vikasreddy Anecdotally, I saw experts in Elm spend enormous amounts of time adjusting and perfecting types as the requirements for the business changed. The statically typed code was safer, but at a very high cost in terms of time.
@vikasreddy 1. Static types are more work than they are worth: there are cases where the type is complicated but the logic is relatively simple. I saw an example in Typescript a few days ago on Twitter, of course I can't find it now.
a big deal: @elonmusk, Y. Bengio, S. Russell, @tegmark, V. Kraknova, P. Maes, @Grady_Booch, @AndrewYang, @tristanharris & over 1,000 others, including me, have called for a temporary pause on training systems exceeding GPT-4 https://t.co/PJ5YFu0xm9
All of this is based on the following sources. Any misinterpretation or mistakes are entirely my fault! I'm certainly not a Zig expert by any means.
- https://t.co/AYAVlHNk4d
- https://t.co/rOlq6wZt4i
#clojure is my favorite language, but I've been toying around with #ziglang in my spare time. The language is of course very different from #clojure in features and purpose, but there are some interesting parallels (and coincidences).
If you like either #ziglang or #clojure, I'd recommend trying out the other language. They are very different in many ways, but I suspect you'll find much to learn and appreciate. I certainly did!