Replies: 0 comments 1 reply
-
This would also apply to get_value_at_indices, set_value, and set_value_at_indices. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm revisiting the Java BMI specification. Currently, it's written to use primitive data types for model exchange items. In Java, primitive types are faster and require less memory. They also fit the BMI custom of using basic data types in a language. The drawback is that primitive types can't be represented as a generic type in Java, so they require (for example) a separate get_value method for each type:
Java has wrapper classes for the primitive types (e.g., the
Double
wrapper for thedouble
primitive). Wrappers are slower and require more memory, but they're likely more often used by Java developers who may not be familiar with BMI, and they support generic types, which simplify the get_value interface:Should the Java BMI specification support both primitive types and wrapper classes?
Beta Was this translation helpful? Give feedback.
All reactions