It was only an experiment. If there are reasons to change that,
absolutely. One good reason for offering scope() as a function is that
it makes it difficult to create uninitialized scoped objects.
Andrei
On 08/07/2010 03:13 AM, SHOO wrote:
Why is std.typecons.scoped offered by only a function?
I think that a struct is offered is better than only a function.
For example, this allows following code:
http://ideone.com/LMADW
I read some related posts in the past. They want scope member variables.
I think scoped!(T) has potential to become one solution for it.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos