Crow programming language

andy andy-hanson at protonmail.com
Fri Feb 16 03:21:48 UTC 2024


On Friday, 16 February 2024 at 01:26:42 UTC, Richard (Rikki) 
Andrew Cattermole wrote:

> You can use const instead which doesn't have any such 
> guarantees and it'll work with a pure function :)

It still seems to be considered mutable?

     pure void main() {
         // a.d(2): Error: `pure` function `D main` cannot access 
mutable static data `strings`
         auto mut = cast(string[]) strings;
         mut ~= "foo";
     }

     const string[] strings;



More information about the Digitalmars-d-announce mailing list