www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - interface template problem

reply Philipp Heise <Philipp_member pathlink.com> writes:
Hi,

i tried this with my interface template and it doesn't compile/work :

interface XYZ(T) {
..
public void foo(XYZ!(T) bar);
..
}

how can i achieve the desired effect ?

thnx Philipp
Feb 27 2006
next sibling parent reply "Andrew Fedoniouk" <news terrainformatica.com> writes:
Walter, what is the global purpose of recent beautifications?
I am speaking about regexps, if(;) and on_scope_exit() & co.

What is the major goal of current D development (big picture)?

For me these changes seems like sporadic efforts to attach
bells and whistles. They double stuff what is already in language and
yet increase entropy of D grammar significantly.

So sorry but I would like to get an idea of directions D is moving.

Thanks in advance,

Andrew.
http://terrainformatica.com
Feb 27 2006
parent Kyle Furlong <kylefurlong gmail.com> writes:
Andrew Fedoniouk wrote:
 Walter, what is the global purpose of recent beautifications?
 I am speaking about regexps, if(;) and on_scope_exit() & co.
 
 What is the major goal of current D development (big picture)?
 
 For me these changes seems like sporadic efforts to attach
 bells and whistles. They double stuff what is already in language and
 yet increase entropy of D grammar significantly.
 
 So sorry but I would like to get an idea of directions D is moving.
 
 Thanks in advance,
 
 Andrew.
 http://terrainformatica.com
 
 
 
 
 
 
 
 
I think this recent push might be that Walter wants some neat, new for D, features to present at his shindig this year. I could be wrong though.
Feb 27 2006
prev sibling parent reply "Regan Heath" <regan netwin.co.nz> writes:
On Mon, 27 Feb 2006 18:42:52 +0000 (UTC), Philipp Heise  
<Philipp_member pathlink.com> wrote:
 i tried this with my interface template and it doesn't compile/work :

 interface XYZ(T) {
 ..
 public void foo(XYZ!(T) bar);
 ..
 }

 how can i achieve the desired effect ?
Can you post more code, my attempt at replicating the problem seems to work: import std.stdio; interface XYZ(T) { public void foo(XYZ!(T) bar); } class A : XYZ!(int) { public void foo(XYZ!(int) bar) { writef("a"); } } void main() { A a = new A(); XYZ!(int) b; a.foo(b); } Regan
Feb 27 2006
parent Philipp Heise <heise in.tum.de> writes:
Regan Heath wrote:
 On Mon, 27 Feb 2006 18:42:52 +0000 (UTC), Philipp Heise 
 <Philipp_member pathlink.com> wrote:
 
 i tried this with my interface template and it doesn't compile/work :

 interface XYZ(T) {
 ..
 public void foo(XYZ!(T) bar);
 ..
 }

 how can i achieve the desired effect ?
Can you post more code, my attempt at replicating the problem seems to work:
problem solved - my version of the compiler was too old. thnx philipp
Feb 27 2006