"headconst" dynamic arrays?

bearophile bearophileHUGS at lycos.com
Wed Aug 31 07:13:35 PDT 2011


Kagamin:

> It's not needed to extend type system. Compiler can check you don't set arguments indiscriminately. I believe some source analyzer already does it.

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?

Bye,
bearophile


More information about the Digitalmars-d mailing list