On Thursday, 7 November 2013 at 20:48:58 UTC, Jacob Carlborg wrote:

* If a template mixin, which uses the string mixin, is provided the syntax will look a bit nicer

I agree that template mixin syntax is a bit nicer, but I ran into a few issues with them. In the end I settled with the string mixin, because it avoids those issues and also was more powerful (User can now choose the protection). How would your template mixin wrapper look like?


* Isn't it better to use an enum for the protection attributes?

Not sure as the protection attributes are keywords. I'll think about it, do others agree that an enum would be better with private_, protected_, .... members ?


* Would it make sense to allow "export" as a protection attribute as well?

Oh, quite the other way round, the public in the assert list is quite unnecessary. If you want to go public/export just use "none" as protection and set it yourself, like:
public {
     mixin(signal!(string, int)("valueChanged", "none"));
}


Thanks for the feedback.

Reply via email to