stedolan / malfunction

Malfunctional Programming
Other
336 stars 19 forks source link

Mixed mutable and immutable fields #7

Closed DemiMarie closed 7 years ago

DemiMarie commented 8 years ago

Some OCaml code uses mixed mutable and immutable blocks, such as this:

type q = { x : int; mutable y : int; }

It would be useful for Malfunction to support this.

chambart commented 7 years ago

The OCaml backend does not in fact. this would be compiled as a whole mutable block.

stedolan commented 7 years ago

The OCaml backend does not in fact. this would be compiled as a whole mutable block.

In that case, I'll close this issue. Malfunction code can make do with blocks (wholly immutable) and vectors (wholly mutable).