www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Move/borrow talk on Nim

reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
https://fosdem.org/2020/schedule/event/nimmovesemantics/

Might be of interest.
Feb 05 2020
parent reply IGotD- <nise nise.com> writes:
On Wednesday, 5 February 2020 at 20:19:01 UTC, Dibyendu Majumdar 
wrote:
 https://fosdem.org/2020/schedule/event/nimmovesemantics/

 Might be of interest.
Yes, it is of interest here. What I think is interesting here that he says that in practice the compiler could infer when to use move and borrow without using the new keywords "sink" and "lent" and they would gradually be removed. The same is pretty much analogous to letting the compiler analyze the code in order omit increasing/decreasing reference count which is he also mentions. This also what I think should be approach in D, which is borrow checker should stay out of the way as much as possible without any additions to language syntax.
Feb 05 2020
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/5/2020 12:52 PM, IGotD- wrote:
 This also what I think should be approach in D, which is borrow checker should 
 stay out of the way as much as possible without any additions to language
syntax.
The current O/B design in D has zero additions to the syntax other than an ` live` attribute for a function. It relies heavily on leveraging the existing DIP25 and DIP1000 implementations. I know it's been a hard sell for those two, but it's paying off.
Feb 05 2020
parent Araq <rumpf_a web.de> writes:
On Thursday, 6 February 2020 at 07:04:10 UTC, Walter Bright wrote:
 It relies heavily on leveraging the existing DIP25 and DIP1000 
 implementations. I know it's been a hard sell for those two, 
 but it's paying off.
Yeah, I'm following your live feature and it will be very interesting to compare the solutions once they matured.
Feb 05 2020