On Friday, 16 November 2018 at 14:55:52 UTC, Aditya wrote:
How can one write own factory function ? Any pointers to this ?
Something like
Interface delegate()[string] factories;
Interface create(string className) {
if(className in factories)
return factories[classname];
else
On Friday, 16 November 2018 at 14:55:52 UTC, Aditya wrote:
On Friday, 16 November 2018 at 14:30:02 UTC, Adam D. Ruppe
wrote:
PS object.factory sucks and I hope it is removed some day.
There's no plan to do so, but I still wouldn't actually rely
on it... instead, I'd write your own factory
On 11/16/18 9:51 AM, Aditya wrote:
On Friday, 16 November 2018 at 14:28:22 UTC, Adam D. Ruppe wrote:
On Friday, 16 November 2018 at 14:24:10 UTC, Aditya wrote:
./ss/Stat.d (defines interface named 'Stat')
./ss/Min.d (defines class named 'Min' that implements Stat)
Did you put a module
On Friday, 16 November 2018 at 14:30:02 UTC, Adam D. Ruppe wrote:
PS object.factory sucks and I hope it is removed some day.
There's no plan to do so, but I still wouldn't actually rely on
it... instead, I'd write your own factory function and
registration system, so you control it and will
On Friday, 16 November 2018 at 14:28:22 UTC, Adam D. Ruppe wrote:
On Friday, 16 November 2018 at 14:24:10 UTC, Aditya wrote:
./ss/Stat.d (defines interface named 'Stat')
./ss/Min.d (defines class named 'Min' that implements Stat)
Did you put a module declaration at the top of those files?
PS object.factory sucks and I hope it is removed some day.
There's no plan to do so, but I still wouldn't actually rely on
it... instead, I'd write your own factory function and
registration system, so you control it and will have reliability
to your specific needs.
but still if the factory
On Friday, 16 November 2018 at 14:24:10 UTC, Aditya wrote:
./ss/Stat.d (defines interface named 'Stat')
./ss/Min.d (defines class named 'Min' that implements Stat)
Did you put a module declaration at the top of those files? Like
module ss.Stat;
That ought to be required; the compiler