@Crell I would say that this article is meant to be controversial and deliberately ignore nuances :P But there are some cases for example around serialization where a complex array shape as a typehint helps a lot during static analysis. Turning db data, API requests or responses into objects can be so much easier and transparent if you do it with arrays, array shapes and proper static analysis.
@Crell I was using Valinor for some time, but covering some non-trivial cases seemed to be more pain then it should have. Creating fromArray static factories and toArray methods with proper array shape doesn't seem like an "unproper" serialization.
@ramsey@Crell we have a fully capable type system with runtime enforcement. The phrasing "type hint" is used when it's a "hint" but there's nothing in the runtime to enforce it.
Add comment