On Tuesday, 1 September 2015 at 12:55:11 UTC, Benjamin Thaut wrote:
While your proposal sounds interresting to start with I don't like some of the implications:

1) You force people to write unittest. If people don't write a export unittest block their templates won't work across shared library boundaries.
Not writing unittests is a bad idea anyway.
Much more so if you want to ship your code as library!

2) A template in D might get __very__ complex. To make sure that each and every function needed is actually exported your unittests would need to have 100% coverage. Looking at some of the template code in phobos this won't be any more fun than manually putting export in front of every required function.
Oh yes, it's much more fun, because you get something very valueable in return: 100% coverage! The more complex the template gets, the more valueable such a unittest becomes. Especially in phobos I pretty much expect such unittests to already exist. What a shame if not so!

Reply via email to