Hi Markus,
On 08/06/2020 19:08, Markus Fischer wrote:
Since we humans read source more often then we write, I can only
suggest to everyone to conduct their own "visual" testing first and
not just judge on technical merits => I think it makes sense to
consider both here, since we're already discussing a change here.
I was just thinking about how different fonts would affect this, and
particularly those with ligatures - a lot of coding fonts already
include ligatures for << and >> and some have something for #[ as well;
I wonder how easy it would be to create a "nice" ligature for @@
In doing so, I found this site which lets you compare text in a long
list of programming fonts, which is interesting to play with how the
different syntaxes "feel": https://www.programmingfonts.org/
It doesn't have a save/share function, so here's a code sample of the
main styles discussed so far for people to play with:
// Currently implemented
<<ManyToMany(Phonenumber::class)>>
<<JoinTable("users_phonenumbers")>>
<<JoinColumn("user_id", "id")>>
<<InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE)>>
private $phonenumbers;
// Proposed grouping
<<
ManyToMany(Phonenumber::class),
JoinTable("users_phonenumbers"),
JoinColumn("user_id", "id"),
InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE),
>>
private $phonenumbers;
// Rejected alternative in original RFC
@:ManyToMany(Phonenumber::class)
@:JoinTable("users_phonenumbers")
@:JoinColumn("user_id", "id")
@:InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE)
private $phonenumbers;
// Double-at proposal
@@ManyToMany(Phonenumber::class)
@@JoinTable("users_phonenumbers")
@@JoinColumn("user_id", "id")
@@InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE)
private $phonenumbers;
// Rust-style
#[ManyToMany(Phonenumber::class)]
#[JoinTable("users_phonenumbers")]
#[JoinColumn("user_id", "id")]
#[InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE)]
private $phonenumbers;
// Rust-style with grouping
#[
ManyToMany(Phonenumber::class),
JoinTable("users_phonenumbers"),
JoinColumn("user_id", "id"),
InverseJoinColumn("phonenumber_id", "id", JoinColumn::UNIQUE),
]
private $phonenumbers;
Regards,
--
Rowan Tommins (né Collins)
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php