isRef, isLazy, isOut
Eldar Insafutdinov
e.insafutdinov at gmail.com
Sat Dec 19 03:50:41 PST 2009
Following the commits to the dmd repository I found these traits implemented. The idea is good, but the API chosen does not look right. Why not have __traits(storageClass, symbol) and a enum which defines the return value:
enum StorageClass {
None,
Ref,
Lazy,
Out
}
One could write templates isRef, isLazy etc on top of that if he/she really needs. IMO this is a cleaner way to implement this particular feature.
More information about the Digitalmars-d
mailing list