DLR-SC / tixi

A simple XML interface library
Apache License 2.0
35 stars 17 forks source link

Deprecate Array Functions #142

Closed joergbrech closed 4 years ago

joergbrech commented 4 years ago

The functions

tixiGetArray
tixiGetArrayDimensionNames
tixiGetArrayDimensions
tixiGetArrayDimensionSizes
tixiGetArrayDimensionValues
tixiGetArrayElementCount
tixiGetArrayElementNames
tixiGetArrayParameterNames
tixiGetArrayParameters
tixiGetArrayValue

refer to a full-factorial map of values and are not used this way in CPACS anymore. In addition, the terminology might be confusing, as arrays in CPACS refer to something different. These functions should be marked deprecated for the next minor release, in case anyone is still using them. Then, possibly in a next major release, these functions can be removed/renamed.

rainman110 commented 4 years ago

@joergbrech Currently, the functions are only deprecated for C and C++ users. Python / Fortran and Matlab users do not get informed about the deprecation.

Should we either

joergbrech commented 4 years ago

Hmm, good point!

You are right about the first option to be very annoying, but on the other hand I am not sure how we would handle your second suggestion: In C and C++ deprecation warnings appear at compile time. For interpreted languages like python and matlab we won't get around throwing warnings: In Python we have a DeprecationWarning, for Matlab I don't know if there is a golden way to do this. So the way I see it, warnings are the only real option. And then I would much rather write them in C and have the binding generator take care of it, rather than having to bloat the bindings generator for language specific deprecation warnings.

rainman110 commented 4 years ago

I agree, writing them in C is the most generic way and probably the way to go.