<div dir="ltr">This bit seems odd:<div><br></div><div><pre style="font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-radius:3px;color:rgb(51,51,51)">T <span class="" style="color:rgb(121,93,163)">func</span>(T<span class="" style="color:rgb(167,29,93)">*</span> t) {
<span class="" style="color:rgb(167,29,93)">return</span> t; <span class="" style="color:rgb(150,152,150)">// ok</span>
}</pre></div><div>Is there an implicit conversion from T* to T?<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 10, 2016 at 10:05 PM, rikki cattermole via Digitalmars-d-announce <span dir="ltr"><<a href="mailto:digitalmars-d-announce@puremagic.com" target="_blank">digitalmars-d-announce@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11/08/2016 8:35 AM, Dicebot wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
The first DIP has just landed into the new queue. It is a proposal from<br>
language authors and thus it bypasses usual nitpicking process and<br>
proceeds straight to requesting community (your!) feedback.<br>
<br></span>
Essentially, it is an attempt to solve reference lifetime problem by<br>
extending implementation of `scope` keyword.<br>
<br>
Proposal text: <a href="https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md" rel="noreferrer" target="_blank">https://github.com/dlang/DIPs/<wbr>blob/master/DIPs/DIP1000.md</a><br>
<br>
Few notes:<br>
<br>
- Please submit pull requests to adjust the markdown document if you<br>
want to propose any improvements (mentioning @WalterBright and @andralex<br>
for confirmation).<br>
- The proposal refers to a number of other documents and it is<br>
recommended to become familiar at least briefly with all of them.<br>
- At this point the question I'd personally suggest to be evaluated is<br>
"does this proposal enable enough useful designs?". A good check would<br>
be to try taking some of your projects and see if having DIP1000<br>
approved and implemented could improve them.<br>
</blockquote>
<br>
Question:<br>
I see RefCountedSlice example, does this mean if I alias this say like:<br>
<br>
struct FooBar;<br>
<br>
struct Foo {<br>
FooBar* v;<br>
<br>
scope FooBar* get() { return v; }<br>
alias this get;<br>
}<br>
<br>
That it will operate correctly in the below case?<br>
<br>
func(myFoo);<br>
void func(scope FooBar*)<br>
<br>
If this does work, this is a major addition that I've been waiting for, for my managed memory concept! <a href="https://github.com/rikkimax/alphaPhobos/blob/master/source/std/experimental/memory/managed.d" rel="noreferrer" target="_blank">https://github.com/rikkimax/al<wbr>phaPhobos/blob/master/source/<wbr>std/experimental/memory/<wbr>managed.d</a><br>
After this I'll only need proper ref counting in the language ;)<br>
</blockquote></div><br></div>