Closed thekid closed 1 year ago
This would also bring up the discussion whether https://wiki.php.net/rfc/deprecated_attribute should be implemented.
https://blog.softwaremill.com/the-case-against-annotations-4b2fb170ed67
There are some great use-cases. For example, the
@Override
and@FunctionalInterface
annotations in Java or@tailrec
in Scala. These are checked at compile-time and provide actionable value to the programmer. [...] Some languages, like Ceylon, take this idea even further — there are no modifiers, only annotations; or Scala, where override is a regular keyword.
https://wiki.php.net/rfc/marking_overriden_methods is in voting, 22:1 at the time of writing.
Released in Released in https://github.com/xp-framework/compiler/releases/tag/v8.15.0
See https://github.com/php/php-src/pull/9836, here's a proof of concept in the PHP emitter:
The questions that this raises: