Brent 'Dax' Royal-Gordon wrote in perl.perl6.language :
> Basically, I'd like to be able to mark a variable as "sensitive" or
> "secret". This implies that the language should overwrite the memory
> it uses before deallocating it, and that if possible it should tell
> the virtual memory system to avoid swapping it out. Moreover, it
> should probably do so recursively, and to any value that has ever been
> stored in the variable. (In essence, the *variable* marks all
> *values* it ever contains as sensitive.)
>
> This feature could make Perl 6 a better language for security work
> than any other I've seen. C and C++ could do this, but only with the
> programmer's assistance (by calling a "wipe" function or making sure a
> destructor is correctly called), and optimizers have been known to
> "helpfully" remove such code.
Isn't the "volatile" modifier supposed to avoid this ?
Oh, and remark that "volatile" is quite a high-level construct for a
language like C. So, such a "sensitive" modifier could be added, but its
precise meaning would be highly dependent on the underlying
implementation.
--
The universe (which others call the Library) is composed of an indefinite and
perhaps infinite number of hexagonal galleries.
-- Borges