Comment on What is your favorite programming language?
aluminium@lemmy.world 1 year ago
Typescript. Its pretty good and feature compleate overall, but has by far the most flexible typesystem.
Comment on What is your favorite programming language?
aluminium@lemmy.world 1 year ago
Typescript. Its pretty good and feature compleate overall, but has by far the most flexible typesystem.
spikespaz@programming.dev 1 year ago
It has by far the most broken type system which is basically a facade for the programmer to feel safe
didibear@lemmy.world 1 year ago
Yes, the fact that mutable lists are not contravariant makes it super scary: Here is a basic example.
realharo@lemm.ee 1 year ago
On one hand, this is definitely a gap, on the other hand, you are very unlikely to run into it in practice.
The whole “pass an array/object into some function that will mutate it for you” pattern is not very popular in JS, you are much more likely to encounter code that just gives you a new array as a return value.