Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #51525, comment 34


Ignore:
Timestamp:
08/08/2024 05:39:48 PM (9 months ago)
Author:
mathieulamiotwpmedia
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #51525, comment 34

    v1 v2  
    22
    33I can see how nullable types could be used, with code abusing a bit booleans and being permissive with null cases for instance.
    4 About union types, we would probably not use it as plugin or theme developers, because as you mention, it's a bit missing the goal of simplifying safe checks (and that's probably why we did not even think about it in the first place). But if it is not too complex to add and it can help adoption for already existing filters, we would give it a go...
     4About union types, we would probably not use it as plugin or theme developers, because as you mention, it's a bit missing the goal of simplifying safe checks (and that's probably why we did not even think about it in the first place). But if it is not too complex to add and it can help adoption for already existing filters in Core, we would give it a go...