Re: Default Implementation For an Interface

2012-02-16 Thread Lukasz
On Thursday, 16 February 2012 at 10:24:44 UTC, Jonathan M Davis wrote: On Thursday, February 16, 2012 11:11:20 Jacob Carlborg wrote: You can create an abstract class that implements some parts of the interface. Then the user (developer) is free to choose to inherit from the interface or the ab

Re: ~= call copy ctor?

2012-07-20 Thread Lukasz
On Friday, 20 July 2012 at 21:41:45 UTC, Namespace wrote: Something else which is against classes: incorrect scope behaviour: [code] import std.stdio; class TestC { public: this() { writeln("CTOR class"); } ~this() { writeln("DTOR class")

Re: ~= call copy ctor?

2012-07-20 Thread Lukasz
On Friday, 20 July 2012 at 21:54:05 UTC, Namespace wrote: On Friday, 20 July 2012 at 21:51:02 UTC, David Nadlinger wrote: On Friday, 20 July 2012 at 21:41:45 UTC, Namespace wrote: Why comes "DTOR class" _after_ "end main" and not before? If i write "scope TestC c = ...;" it is correct, but i re

std.typecons.Proxy + inheritance breaks cast'ing to inherited type

2015-03-16 Thread Lukasz Wrzosek via Digitalmars-d-learn
Hello I was just exploring possibility to mimic multiple inheritance from C++ (do not ask why, just for fun). I've stumbled on below issue (let's say corner case) and most likely this is bug in implementation of template Proxy, isn't it ? import std.typecons; class IA {} class IB {} class C :

Re: std.typecons.Proxy + inheritance breaks cast'ing to inherited type

2015-03-16 Thread Lukasz Wrzosek via Digitalmars-d-learn
On Monday, 16 March 2015 at 12:03:12 UTC, John Colvin wrote: What behaviour would you expect if both IA and C inherited from IB? This case should assert at compile time. But my example shows that case with implicit case is working, but the explicit cast is not. That seems to be incorrect IMO

Re: std.typecons.Proxy + inheritance breaks cast'ing to inherited type

2015-03-16 Thread Lukasz Wrzosek via Digitalmars-d-learn
Bug reported as https://issues.dlang.org/show_bug.cgi?id=14298

Re: struct variable initialized with void.

2015-03-31 Thread Lukasz Wrzosek via Digitalmars-d-learn
On Tuesday, 31 March 2015 at 15:12:54 UTC, ref2401 wrote: struct MyStruct { // stuff } void main(string[] args) { MyStruct s1 = void; } Could anyone describe me what this initialization does, please? When do I need to use the void initialization? By default variables are initi