[Issue 12570] cast to template interface

2014-04-13 Thread d-bugmail
https://issues.dlang.org/show_bug.cgi?id=12570 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 12570] New: cast to template interface

2014-04-12 Thread d-bugmail
https://issues.dlang.org/show_bug.cgi?id=12570 Issue ID: 12570 Summary: cast to template interface Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1

Re: template interface and delegates

2014-04-02 Thread Kenji Hara
On Tuesday, 1 April 2014 at 19:55:05 UTC, Steven Schveighoffer wrote: On Tue, 01 Apr 2014 15:47:42 -0400, anonymous n...@trash-mail.com wrote: Is this bug allready reported? or can somebody who has a deeper insight to this report it? I don't know. I think you should report it. If it's

Re: template interface and delegates

2014-04-01 Thread anonymous
Is this bug allready reported? or can somebody who has a deeper insight to this report it? On Tuesday, 1 April 2014 at 05:51:46 UTC, anonymous wrote: Ok, thought i did something wrong or got some wrong idea how it should work.

Re: template interface and delegates

2014-04-01 Thread Steven Schveighoffer
On Tue, 01 Apr 2014 15:47:42 -0400, anonymous n...@trash-mail.com wrote: Is this bug allready reported? or can somebody who has a deeper insight to this report it? I don't know. I think you should report it. If it's already reported, someone will close it as a duplicate -Steve

template interface and delegates

2014-03-31 Thread anonymous
Hi, I'm new to D and played a bit with templates and delegates. Now i discovered some behaviore that i don't understand. Can somebody explain me why i get two different outputs? import std.stdio; interface A(T){ bool GetBool(); T getT(); } class C:A!(double){ override

Re: template interface and delegates

2014-03-31 Thread Justin Whear
On Mon, 31 Mar 2014 18:58:30 +, anonymous wrote: Hi, I'm new to D and played a bit with templates and delegates. Now i discovered some behaviore that i don't understand. Can somebody explain me why i get two different outputs? import std.stdio; interface A(T){ bool

Re: template interface and delegates

2014-03-31 Thread Steven Schveighoffer
On Mon, 31 Mar 2014 14:58:30 -0400, anonymous n...@trash-mail.com wrote: Hi, I'm new to D and played a bit with templates and delegates. Now i discovered some behaviore that i don't understand. Can somebody explain me why i get two different outputs? import std.stdio; interface A(T){

Re: template interface and delegates

2014-03-31 Thread anonymous
Ok, thought i did something wrong or got some wrong idea how it should work.

Re: Template Interface

2012-06-13 Thread Nick Treleaven
cost, unlike using templates). I'm suggesting something like a template interface, which is compatible with all types, and serves as a placeholder for any type for which the body compiles: [snip] void fun(List!string l); Maybe: void fun(L:IList)(L l); template interface IList(E) { template

Re: Template Interface

2012-06-13 Thread Nathan M. Swan
with the current interface. A possible enhancement is to allow structs to implement interfaces (but this has a runtime cost, unlike using templates). I'm suggesting something like a template interface, which is compatible with all types, and serves as a placeholder for any type for which

Re: Template Interface

2012-06-13 Thread Mehrdad
with the current interface. I'm suggesting something like a template interface, which is compatible with all types, and serves as a placeholder for any type for which the body compiles: What you're looking for were also proposed for C++; they were called concepts void fun(List l); template

Re: Template Interface

2012-06-13 Thread Jacob Carlborg
On 2012-06-13 15:34, Nick Treleaven wrote: Maybe it would be better for the template interface body to contain method signatures/members rather than code? I would prefer that. I think it might be an interesting idea, but it would probably need to be significantly better than the current way

Template Interface

2012-06-12 Thread Nathan M. Swan
interface, which is compatible with all types, and serves as a placeholder for any type for which the body compiles: void fun(List l); template interface List { List l; if (l.nil) {} auto e = l.car; l = l.cdr; } It might be have parameters: void fun(List!string l); template

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2012-04-27 Thread d-bugmail
/bb9200a4f80c912a4b9e4c4649307d86edb0624c Issue 4174 - Template interface functions not allowed, making operator overloads difficult The lifting restriction banning final and static members in interfaces should also apply to template functions. https://github.com/D-Programming-Language/dmd/commit

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2012-04-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2012-04-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||d...@dawgfoto.de ---

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2012-01-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 Alex R�nne Petersen xtzgzo...@gmail.com changed: What|Removed |Added CC|

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2011-06-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch, rejects-valid

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2010-12-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 Andrei Alexandrescu and...@metalanguage.com changed: What|Removed |Added Status|NEW |ASSIGNED

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2010-12-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 --- Comment #3 from Steven Schveighoffer schvei...@yahoo.com 2010-12-29 12:40:08 PST --- Yes, I think back in May, you needed +=. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this

[Issue 4174] New: Template interface functions not allowed

2010-05-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 Summary: Template interface functions not allowed Product: D Version: 2.041 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2

[Issue 4174] Template interface functions not allowed, making operator overloads difficult

2010-05-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4174 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added Severity|normal |blocker --