Jonathan Lindegaard Starup

Results 363 comments of Jonathan Lindegaard Starup

> Is it possible to omit the `new` keyword and just have `Point { x = 42, y 12 }`? I think that is possible yes, but I think this...

Also closer to `Cons(x, xs)` / `Cons { head = x, tail = xs }` / `MutCons @ rc { head = x, tail = xs }`

> Does the struct have to be declared as mut? I'd say yes, to be consistent with the struct fields and Flix in general ("dangerous" things are opt-in) > Let...

> We don't need mut struct. We can easily determine that by looking at the fields. This can be very annoying for WIP code. - If you add a `mut`...

> I see. Because PureStruct could be a Java class? > > Does resolution not deal with that or? Currently they are differentiated at parse-time. We could convert `new ..`...

> OK; I thought there was a desire to do that refactor anyway. So then no new syntax would be needed here. I think it'd be nice to disambiguate the...

We did talk about that when adding structs. Even mutable structs are equivalent types records and enums ``` struct Test[r] { mut x: Int32 y: Int32 } enum Test[r] {...

- Declaration Syntax - Explicit `mut struct ..` or `struct ..` ⭐ - Implicit by the fields of the struct - New Syntax - Use separate `new JavaType {}` syntax...

> I see no need for mut on the struct itself. We don't have that for enums or type aliases etc. I don't understand, mut is only a concept for...

@magnus-madsen this also clears things up about boxing - we do not do boxing