Re: dip1000 return scope dmd v 2.100

2022-05-07 Thread vit via Digitalmars-d-learn
On Friday, 6 May 2022 at 17:17:01 UTC, Dennis wrote: On Friday, 6 May 2022 at 09:24:06 UTC, vit wrote: [...] They were recently updated to match the implementation in 2.100. [...] `return scope` means pointer members (such `this.ptr`, `C.ptr`) may not escape the function, unless they are

Re: dip1000 return scope dmd v 2.100

2022-05-06 Thread Dennis via Digitalmars-d-learn
On Friday, 6 May 2022 at 09:24:06 UTC, vit wrote: It look like examples at page https://dlang.org/spec/function.html#ref-return-scope-parameters are no longer relevant. They were recently updated to match the implementation in 2.100. What difference are between `return scope`, `scope return`

dip1000 return scope dmd v 2.100

2022-05-06 Thread vit via Digitalmars-d-learn
Hello, new dmd (2.100) has return/scope changes. It look like examples at page https://dlang.org/spec/function.html#ref-return-scope-parameters are no longer relevant. What difference are between `return scope`, `scope return` and `return`? Why `void* ptr` in struct change effect of `scope