Search code examples
dml-lang

vect keyword in DML 1.4


When using the "vect" keyword in dml 1.4 I'm getting the following warning:

warning: Use of unsupported feature: vect types

And noted in the documentation the following:

Use of unsupported feature: ... [WEXPERIMENTAL] This part of the language is experimental, and not yet officially supported. Code relying on the feature may break without notice in future releases.

What's the recommended alternative to vect types ?


Solution

  • Reposting an answer by Love, found in a chat log:

    If you truly do need dynamically-resizable arrays, then there is currently no good alternative for vect. The support for Simics's vect.h vector types (that is what DML's vect is) is a stop-gap solution, and has a number of usability issues. This is why you get the warning; the DML team knew from the beginning we wanted a better solution. That better solution is actually under development, though it can take months before it lands for proper usage. You should prefer fixed-sized arrays instead of vect if suitable (as even if the length is dynamic, there is typically a realistic upper bound), but if not, then feel free to use vect. We will continue support for it for at least until the Simics major after the better, sanctioned solution has been released; i.e we will only discontinue support at the very earliest with Simics 8; realistically, only with Simics 9.