how has the program been restricted by an unused type?
-
-
Presumably, by having any static types at all, you now have libraries that use them, and constraints on the design of the overall language, which impacts you indirectly. If nothing uses them, then why have them at all?
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
imagine if you could "throw away" the second type whenever you wanted to (e.g. casting) to solve that first problem. The "why have them at all?" is in the case you wanted a second type, maybe even a third would be possible!
1 reply 0 proslijeđenih tweetova 1 korisnik označava da mu se sviđa -
The programmers in dynamically-typed languages don’t feel that the static constraints are all that beneficial given they’re enforcing correctness with their tests anyway, so they don’t want to have to write pointless casts all over their program. They don’t want any static types.
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
I'm a programmer in dynamically-typed languages, I DO feel that static constraints are beneficial, even given the best testing situation possible. I don't want to write casts, I want tooling.
1 reply 0 proslijeđenih tweetova 2 korisnika označavaju da im se sviđa -
Look, me too, but you and I don’t get to speak for every dynamically-typed programmer. If you have a concrete alternative to what they’re doing that avoids the pitfalls they don’t want, then great, but neither of us have that, and arguing this comes off as disparaging them.
1 reply 0 proslijeđenih tweetova 5 korisnika označava da im se sviđa -
I'm not disparaging any person
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
I feel like asking the question “how has the program been restricted by an unknown type?” isn’t showing a ton of empathy for people who feel like it has. The static-vs-dynamic argument is really toxic, and I’d like to make it less so, but that requires a little compassion.
1 reply 1 proslijeđeni tweet 6 korisnika označava da im se sviđa -
I've got absolute compassion, nobody actually has a problem with the theoretical possibility of a system having more types, it's all about the tooling
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
I disagree—I think there are genuinely useful patterns that work in dynamically-typed languages that we don’t know how to statically typecheck. You see this a lot in the wild with gradual type systems. Otherwise, I think things like TypeScript would already satisfy them.
0 proslijeđenih tweetova 4 korisnika označavaju da im se sviđa
Working with a static type system is an exercise in learning how to structure your program in a way that cooperates well with the typechecker. There’s a lot of power here, and I personally find it extremely worthwhile, but it’s disingenuous to say static typing is “solved.”
-
-
Odgovor korisnicima @lexi_lambda @brendanzab i sljedećem broju korisnika:
clojure's transducers are another example of a dynamic construct that has proven very difficult to figure out static types for. pretending that dynamically typed languages are just broken statically typed languages with one type is not terribly useful, I agree.
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa -
Odgovor korisnicima @ra @lexi_lambda i sljedećem broju korisnika:
I love transducers as much as the next clojurian but how are the types difficult? It's easy to write them (at least impurely) in Scala or haskell, unless I'm missing something.
1 reply 0 proslijeđenih tweetova 0 korisnika označava da im se sviđa - Još 7 drugih odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.