"headconst" dynamic arrays?

Kagamin spam at here.lot
Wed Aug 31 11:27:09 PDT 2011


bearophile Wrote:

> Some functions need to do everything on a given array, while in other functions I just want to change the array contents. How can the source analyzer tell them apart and show some warnings only on the second kind of functions, without specific annotations?

It will check them indiscriminately. There's little need to overwrite input parameters. Input parameters are by nature likely to be read, overwriting them usually means you lose them, and losing parameters that are likely to be read is a bad practice, so it's a good idea to check for it.


More information about the Digitalmars-d mailing list