Re: [RFC] [DISCUSSION] Compact Object Property Assignment

From: Date: Mon, 16 Mar 2020 14:26:25 +0000
Subject: Re: [RFC] [DISCUSSION] Compact Object Property Assignment
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-109059@lists.php.net to get a copy of this message
Am 16.03.2020 um 12:48 schrieb Jakob Givoni <jakob@givoni.dk>: > I'm opening up my new RFC for discussion: > > https://wiki.php.net/rfc/compact-object-property-assignment > - A pragmatic approach to object literals > > Let me know what you think! Sorry to say but the syntax look very un-PHP-like. [] suggests an array but then is uses literals and = instead of 'strings'/$vars and => which looks wrong to my PHP eye. Apart from that it feels weird that you have an object where you want to initialise so many properties manually instead of through some sort of constructor. Is it more of a record than an object? I'm not sure if I that is a pattern I would want to encourage. My $.02, - Chris

« previous php.internals (#109059) next »