This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Inconsistent behavior of 'delete'
joshua.i.stone wrote:
> [...] IMHO, 'delete' should just work for any (L-value) type of
> operand. Deleting scalars (int, string, or stat) should reset them
> to their initial state. [...]
The delete operator in systemtap was based on that of awk, which
operates on array elements, or optionally arrays, and like C++, is
intended to hint at memory deallocation implications. I don't feel
strongly either way about whether it should be a "reset" for ordinary
scalar ints/strings. Scalar stats would benefit from a reset
operation, assuming we actually have functioning scalar stats. :-(
- FChE