PHP 8: before and after – stitcher.io

  • This topic has 4 replies, 1 voice, and was last updated 1 month ago by helloiamsomeone.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #847
    solver89
    Participant

    PHP 8: before and after – stitcher.io

    #848
    solver89
    Guest

    HN Discussion: [https://news.ycombinator.com/item?id=24866190](https://news.ycombinator.com/item?id=24866190)

    #849
    przemo_li
    Guest

    That subscribe example is borked.

    Event types map 1 to 1 with argument types. Use reflection on PHP 7.4 (or 7.0!) and drop configuration altogether (maybe minus some interface that signals that this is subscriber).

    Done. No need to repeat the same stuff over and over.

    Attributes would benefit relationships that are more complex.

    #850
    phpdevster
    Guest

    Property promotion and named arguments looks awesome. TypeScript has this, and I love it. The named arguments thing is a nice bonus.

    #851
    helloiamsomeone
    Guest

    > `BarIsMissing::new()`

    If that’s supposed to construct an exception then the method will just stink up the stacktrace.
    Also why not just call `new BarIsMissing()`? The typename also ought to signal that it’s an exception.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.