﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3930	Better tuple access functions in MetaModelica	Per Östlund	Martin Sjölund	"To access elements in a tuple you currently need to either use pattern matching or one of the Util.tupleNN functions. It would be nice if there were some way of accessing the elements using an index instead, e.g.:
{{{#!mo
tuple<Integer, String> tup = (1, ""hello"");
String s = tup[2]; // or some other equivalent syntax.
// Maybe also a function to allow function pointer stuff:
Integer i = tupleGet(tup, 1); // or tupleNth, or whatever.
}}}
This would be more flexible and possibly more efficient than using the Util.tupleNN functions, and would also make it possible to use enumerations to name elements:
{{{#!mo
type MyTupleNames = enumeration(index, name);
String s = tup[MyTupleNames.name];
}}}
An issue with this is that each tuple element has its own type, so type checking becomes a problem."	enhancement	new	normal	Future	MetaModelica				Adrian Pop
