3 ms·
As an aside, PHP and TypeScript are the only popular non-FP languages I know that support ad-hoc union types: e.g. private int|float $foo;
by karmakaze 4y ago
As an aside, PHP and TypeScript are the only popular non-FP languages I know that support ad-hoc union types: e.g. private int|float $foo;
- maleldil 4y agoPython supports `Union[int, float]` or `int | float` after 3.10.
- bruce343434 4y agoThese languages are dynamic at their core. Add in the weird edgecases that result from automatic conversions/coersion, and their type systems are a joke. In any case, the code I was working from was still from the "docstring comments as types"-era.