The point of const, scope, and other attributes

Salih Dincer salihdb at hotmail.com
Wed May 11 06:54:14 UTC 2022


On Wednesday, 11 May 2022 at 05:02:31 UTC, Walter Bright wrote:
> There are other reasons for the attributes, such as making code 
> more understandable. A `const` parameter tells you the function 
> doesn't modify that argument, or what it points to. A `scope` 
> parameter tells you the function doesn't save a copy of it, so 
> the caller can confidently delete the data. And so on.

Very satisfying information that I have encountered for the first 
time on subjects that I have never used, thank you. Maybe I'll 
use it more often now :)

SDB at 79


More information about the Digitalmars-d mailing list