News for hackers. Stuff that matters.
Re:Life is a game, this is your strategy guide (2014) by karmakaze on Sunday March 05, 2023 @12:09PM (#35031529)
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;
Re:Life is a game, this is your strategy guide (2014) by maleldil on Sunday March 05, 2023 @01:33PM (#35032482)
Python supports `Union[int, float]` or `int | float` after 3.10.
Re:Life is a game, this is your strategy guide (2014) by bruce343434 on Sunday March 05, 2023 @02:38PM (#35033115)
These 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.