php
PHP 8.4 property hooks: a value object that validates itself
Property hooks and asymmetric visibility let a PHP 8.4 class enforce its own invariants without setter boilerplate. Here is a small subscriber object, plus array_find() to query a list of them.