11-28-2016 11:04 AM
Hello,
I try to follow the programming paradigm, that the lifespan of variables should be kept as short as possible. I miss an UNDATA-statement to kill a local variable after use. It should make code much better: After you are done, the variable is killed. The variable name hereby becomes available for reuse.
This looks so simple to realize. Why does it not exist? Note, that my focus is not on reducing memory, but to shorten the lifespan.
Any reply from the SAP ABAP-developers? Thank you in advance, / Ulrich
11-28-2016 1:29 PM
If I remember well, Horst Keller said a few weeks ago that it could soon arrive (7.52?)
11-28-2016 6:49 PM
Huh, did I? Point me there, what it was about. For the time being the request can be fulfilled with data reference variables.
var = NEW i( 123 ).
... var->* ...
CLEAR var.
11-29-2016 8:03 AM
oh sorry then, but maybe you can talk to the ABAP/kernel guys 😄
Didn't you talk about kind of start/end blocks within the procedures, where the declared data may only be used there, or something like that?
11-29-2016 10:50 AM
Hmm, no currently I'm not aware of such plans. The visibility/usability of data objects in ABAP is in fact kind of queer. You know that: statically visible behind declaration, dynamically usable in whole context. Even the new inline declarations or the LET expressions rather enhance the queerness instead of offering real local visibility. Therefore ...
11-29-2016 11:55 AM
Thanks for correcting me Horst 🙂 Anyway, 7.40+ is so cool (and I'm impatient to know what comes in future releases...)
11-29-2016 12:27 PM
We'll be upgrading to ABAP 750 next year, yayyy!!!
I have already started my planning to use Test-seams 😉
11-30-2016 2:29 PM
11-30-2016 3:28 PM
Nope, I didn't think to “static single assignment”. Probably it was a dream and I thought it would become real 😄