Re[2]: [PHP-DEV] The @@ is terrible, are we sure we're OK with it?

  111118
July 22, 2020 14:15 nesk@xakep.ru (=?UTF-8?B?0JrQuNGA0LjQu9C7INCd0LXRgdC80LXRj9C90L7Qsg==?=)
I completely agree with this statement.

Moreover, I had to write a full-fledged preprocessor in order to implement library functionality, suitable for both attributes and doctrine annotations (for version 7.4 and below).
 
Rust-like syntax (#[xxx]) is both visually pleasing and creates much less problems when implementing such functionality.
 
Note how easy it will be to adapt the new attribute syntax to support them using the doctrine annotation reader:
https://habrastorage.org/webt/w-/dv/vf/w-dvvfygpwdtsmjlcyrr9qxocd0.png
 
The currently accepted "atat" syntax requires the implementation of 4 classes and a bootstrap file that forcibly loads the necessary ones and replaces the files for a specific version of the language. This is exactly the reason why I had to write a preprocessor...
 
>Среда, 22 июля 2020, 16:58 +03:00 от Côme Chilliet < come.chilliet@fusiondirectory.org >: >  >Le Wed, 22 Jul 2020 13:00:10 +0100 (BST), >Derick Rethans < derick@php.net > a écrit : >> Please, let's do the sensible and use the Rusty #[...] syntax. >This syntax is the one I liked the less in the proposed choices, given # is > used for comments. > >Wouldn’t #[] cause more parsing issues than @@? > >What would be the rule, it’d be illegal to start a comment content with '['? > >Côme > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: https://www.php.net/unsub.php >   
  -- Kirill Nesmeyanov     ----------------------------------------------------------------------   -- Kirill Nesmeyanov