Hi Rowan
On Fri, Apr 5, 2024 at 12:28 AM Rowan Tommins [IMSoP]
wrote:
>
> On 03/04/2024 00:01, Ilija Tovilo wrote:
>
> Regardless of the implementation, there are a lot of interactions we will
> want to consider; and we will have to keep considering new ones as we add to
> the language. For
On 03/04/2024 00:01, Ilija Tovilo wrote:
Data classes are classes with a single additional > zend_class_entry.ce_flags flag. So unless customized, they behave as
> classes. This way, we have the option to tweak any behavior we would
> like, but we don't need to. > > Of course, this will still
Data classes will be a very useful addition to "API Platform".
API Platform is a "resource-oriented" framework that strongly encourages
the use of "data-only" classes:
we use PHP classes both as a specification language to document the public
shape of web APIs (like an OpenAPI specification, but
Hi Larry
On Wed, Apr 3, 2024 at 12:03 AM Larry Garfield wrote:
>
> On Tue, Apr 2, 2024, at 6:04 PM, Ilija Tovilo wrote:
>
> > I think you misunderstood. The intention is to mark both call-site and
> > declaration. Call-site is marked with ->method!(), while declaration
> > is marked with "public
Hi Rowan
On Tue, Apr 2, 2024 at 10:10 PM Rowan Tommins [IMSoP]
wrote:
>
> On 02/04/2024 01:17, Ilija Tovilo wrote:
>
> I'd like to introduce an idea I've played around with for a couple of
> weeks: Data classes, sometimes called structs in other languages (e.g.
> Swift and C#).
>
> I'm not sure
Hi Niels
On Tue, Apr 2, 2024 at 8:16 PM Niels Dossche wrote:
>
> On 02/04/2024 02:17, Ilija Tovilo wrote:
> > Hi everyone!
> >
> > I'd like to introduce an idea I've played around with for a couple of
> > weeks: Data classes, sometimes called structs in other languages (e.g.
> > Swift and C#).
>
On Tue, Apr 2, 2024, at 6:04 PM, Ilija Tovilo wrote:
>> What would be the reason not to? As you indicated in another reply, the
>> main reason some languages don't is to avoid large stack copies, but PHP
>> doesn't have large stack copies for objects anyway so that's a non-issue.
>>
>> I've
On Tue, Apr 2, 2024 at 1:47 PM Larry Garfield
wrote:
> > * Data classes protect from interior mutability. More concretely,
> > mutating nested data objects stored in a `readonly` property is not
> > legal, whereas it would be if they were ordinary objects.
> > * In the future, it should be
On 02/04/2024 01:17, Ilija Tovilo wrote:
I'd like to introduce an idea I've played around with for a couple of
weeks: Data classes, sometimes called structs in other languages (e.g.
Swift and C#).
Hi Ilija,
I'm really interested to see how this develops. A couple of thoughts
that
On Tue, Apr 2, 2024, at 20:51, Bruce Weirdan wrote:
> On Tue, Apr 2, 2024 at 8:05 PM Ilija Tovilo wrote:
>
> > Equality for data objects is based on data, rather than the object
> > handle.
>
> I believe equality should always consider the type of the object.
>
> ```php
> new
On Tue, Apr 2, 2024 at 8:05 PM Ilija Tovilo wrote:
> Equality for data objects is based on data, rather than the object
> handle.
I believe equality should always consider the type of the object.
```php
new Problem(size:'big') === new Universe(size:'big')
&& new Problem(size:'big') === new
On 02/04/2024 02:17, Ilija Tovilo wrote:
> Hi everyone!
>
> I'd like to introduce an idea I've played around with for a couple of
> weeks: Data classes, sometimes called structs in other languages (e.g.
> Swift and C#).
>
> In a nutshell, data classes are classes with value semantics.
>
Hi Larry
On Tue, Apr 2, 2024 at 5:31 PM Larry Garfield wrote:
>
> On Tue, Apr 2, 2024, at 12:17 AM, Ilija Tovilo wrote:
> > Hi everyone!
> >
> > I'd like to introduce an idea I've played around with for a couple of
> > weeks: Data classes, sometimes called structs in other languages (e.g.
> >
On Tue, Apr 2, 2024 at 2:20 AM Ilija Tovilo wrote:
>
> Hi everyone!
>
> I'd like to introduce an idea I've played around with for a couple of
> weeks: Data classes, sometimes called structs in other languages (e.g.
> Swift and C#).
>
> In a nutshell, data classes are classes with value semantics.
On Tue, Apr 2, 2024, at 12:17 AM, Ilija Tovilo wrote:
> Hi everyone!
>
> I'd like to introduce an idea I've played around with for a couple of
> weeks: Data classes, sometimes called structs in other languages (e.g.
> Swift and C#).
*gets popcorn*
> In a nutshell, data classes are classes with
Hi Alexander
On Tue, Apr 2, 2024 at 4:53 AM Alexander Pravdin wrote:
>
> On Tue, Apr 2, 2024 at 9:18 AM Ilija Tovilo wrote:
> >
> > I'd like to introduce an idea I've played around with for a couple of
> > weeks: Data classes, sometimes called structs in other languages (e.g.
> > Swift and C#).
Hi Marco
On Tue, Apr 2, 2024 at 2:56 AM Deleu wrote:
>
>
>
> On Mon, Apr 1, 2024 at 9:20 PM Ilija Tovilo wrote:
>>
>> I'd like to introduce an idea I've played around with for a couple of
>> weeks: Data classes, sometimes called structs in other languages (e.g.
>> Swift and C#).
>>
>> snip
>>
On Tue, Apr 2, 2024 at 9:18 AM Ilija Tovilo wrote:
>
> Hi everyone!
>
> I'd like to introduce an idea I've played around with for a couple of
> weeks: Data classes, sometimes called structs in other languages (e.g.
> Swift and C#).
>
> ```php
> data class Vector {
> private $values;
>
>
On Mon, Apr 1, 2024 at 9:20 PM Ilija Tovilo wrote:
> Hi everyone!
>
> I'd like to introduce an idea I've played around with for a couple of
> weeks: Data classes, sometimes called structs in other languages (e.g.
> Swift and C#).
>
> In a nutshell, data classes are classes with value semantics.
Hi everyone!
I'd like to introduce an idea I've played around with for a couple of
weeks: Data classes, sometimes called structs in other languages (e.g.
Swift and C#).
In a nutshell, data classes are classes with value semantics.
Instances of data classes are implicitly copied when assigned to
20 matches
Mail list logo