digitalmars.D.learn - Need help with storage class definition
- mist (16/16) Jan 14 2013 While working on
- mist (2/2) Jan 14 2013 Meh, while I was looking for this info in docs kind Kenji simply
- Kenji Hara (13/29) Jan 14 2013 http://dlang.org/declaration.html#StorageClass
While working on https://github.com/D-Programming-Language/phobos/pull/863 I have noticed that inout breaks ParameterStorageClassTuple and family. I have started working on a fix but quick comparison of http://dlang.org/declaration.html#StorageClass vs have left me in confusion without clear understanding what parameter storage classes are supposed to be defined to. There is also InOutX entry in grammar which lists some of storage classes and seems more relevant to parameter storage classes (i.e. includes ref). Can someone give a more structured explanation: what is supposed to be a storage class, what is supposed to be a type storage class and what - a type qualifier? I'd like to update std.traits demanglers to the latest state of things, but grammar description does not seem clear enough.
Jan 14 2013
Meh, while I was looking for this info in docs kind Kenji simply came out and fixed it, leaving no chance to learn :(
Jan 14 2013
On Monday, 14 January 2013 at 14:16:32 UTC, mist wrote:While working on https://github.com/D-Programming-Language/phobos/pull/863 I have noticed that inout breaks ParameterStorageClassTuple and family. I have started working on a fix but quick comparison of http://dlang.org/declaration.html#StorageClass vs have left me in confusion without clear understanding what parameter storage classes are supposed to be defined to. There is also InOutX entry in grammar which lists some of storage classes and seems more relevant to parameter storage classes (i.e. includes ref). Can someone give a more structured explanation: what is supposed to be a storage class, what is supposed to be a type storage class and what - a type qualifier? I'd like to update std.traits demanglers to the latest state of things, but grammar description does not seem clear enough.http://dlang.org/declaration.html#StorageClass InOutX is the list of 'syntactically allowed' keywords. Among them, these four are supported as actual 'parameter storage classes'. scope out ref lazy In current, 'in' is directly replaced to 'const', and it is treated as a part of parameter type. 'inout' is also treated as a type qualifier, and then is the same. Kenji Hara
Jan 14 2013