﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3867	Add alternative to array<T> for mutable variables	Martin Sjölund	Martin Sjölund	"Currently, a fair deal of code in OMC uses a pattern using `array<T>` with arrays of size 1 in order to make data types mutable. This leads to using `arrayGet(something, 1)` in many places.

It would be nice if we could simply declare variables `mutable<T>`, which would either be translated to arrays of size 1 in the run-time system, or to an immediate pointer (set lowest 2 bits to 1 or something in the header; actual pointer is ptr xor 3), or it is a special type (array1 or mutable). These options would allow to assign a `mutable<T>` to some field in a structure that has a `mutable<T>` (sharing the same variable). It could also be possible that `mutable<T>` was not possible to share (0 additional memory allocations). Or a mixture with `pointer<T>` and `mutable<T>`...

Note that these language features would perhaps not be nice and declarative, but we already have `array<T>` and it is used. This would just make code that uses this feature more maintainable."	enhancement	closed	high	1.12.0	MetaModelica		fixed		Adrian Pop Peter Fritzson Per Östlund
