Why D is not popular enough?
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 2 00:50:29 PDT 2016
On Monday, 1 August 2016 at 19:33:48 UTC, bitwise wrote:
> 'scope' keyword, for example, is legal in D syntax, but doesn't
> actually do anything.
sorry, but you are wrong here. of course, it does HAVE effect.
`void foo (scope delegate () boo)`
this means that compiler should not allocate a closure for
delegate, as `foo` is promising that it will not store `boo`
anywhere.
`scope a = new A();`
this does what you think it does, althru it is deprecated in
favor of `scoped!` template.
More information about the Digitalmars-d
mailing list