I won’t @ them but limiting expressivity in order to limit cognitive load and keep codebases approachable is a totally legitimate move in language design. I’d even say essential. It’s all about balance, and expressivity _does_ have tradeoffs.https://twitter.com/SeanTAllen/status/1036236006872305665 …
I know that this works somewhat because TS eventually fixed the "ignoring" problem in a strict mode, and using ReadonlyArray<T> pervasively helps a lot.
-
-
Sure, but the relationship between Readonly and Array requires lots of complexity.
-
It's a different type that is missing all of the mutation methods, and which normal arrays can be cast into.
-
Sure, but that cast is either unsafe or a special case in the type system or supported by a lot of type system complexity.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.