On 06/23/2017 09:02 PM, Boris-Barboris wrote:
> Hi, I wrote a small library, inspired by atilaneves automem. I didn't
> like some things, especially that smart pointers proxied underlying
> types, also I wanted class upcasting.
> https://github.com/Boris-Barboris/daii
> https://code.dlang.org/packages/daii
> What do you think about the delegate\closure syntax?
> https://github.com/Boris-Barboris/daii#delegate
> Any ideas and contributions are appreciated.

Looks interesting, covariance (upcasting) is definitely a feature
requirement for an standard rc library.
The delegates are interesting. A bit brittle, guess we need some
compiler supported lowering to make non-GC allocated delegates cleaner.

You could try sth. along the lines of

delegate!(sum, "(int v) => sum += v")

but that needs a mixin to rebind the lambda's context.


Reply via email to