June 07, 2014 Re: Create const regex? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rikki Cattermole | On Friday, 6 June 2014 at 12:08:40 UTC, Rikki Cattermole wrote:
> In none of your examples you have not defined the type of the variables. However you are giving it an access modifier.
> I assume you are wanting auto
D does not require providing a type if const/immutable is use. I think at this point it's changed, but 'auto' comes from C storage classes (which is the default). So by providing a storage class the compiler would infer the type and 'auto' was so descriptive for it.
|
Copyright © 1999-2021 by the D Language Foundation