My PHP Wishlist: - generics - inner classes - records - type aliases - algebraic types - sealed classes - pattern matching/destructuring ... and a pony.
@coderabbi I'd be really happy having: - Generics - Array items typing - Local/inline types
@coderabbi My daughter doesn't know PHP but strongly agrees with your desire for the pony ...
@coderabbi Why inner clases when we already have anonymous classes?
@coderabbi The only thing we need right now is: camelCase and consistent native function names.
@coderabbi Glad we have one now! 🐴 x.com/symfonycon/sta…
@coderabbi Glad we have one now! 🐴 x.com/symfonycon/sta…
@coderabbi The sooner PHP gets a strong type system and generics the better
@coderabbi Throw in a Lambo while we're at it
@coderabbi object like sugar for strings and arrays, camelCase aliases for stdlib with saner names, unrestricted by old engine limitations
@coderabbi I'd love to have struct like enums where you can pass values with the enum case, a la rust
@coderabbi Right now I'd settle for proper ENUMs which aren't just a hacked class 😔 The need for "->value" in comparisons is so ugly.
@coderabbi Good list. But you missed currying. First class functions are nice, so I can do this: $func = myFunc(...); ...unless I want to pass a local var to myFunc(). Then I have to: $lv = "foo"; $func = fn ($a, $b) => myFunc($lv, $a, $b); I would prefer: $func = myFunc($lv, ...);