I'm trying to make fuse work in D[1]. I had some help from htod, but not
everything was successful. And I'm not exactly sure how to properly convert
strings and such.
What I currently have allows me to compile some fuse programs (hello for
example[2]). But the result is a dead link (only seem t
spir:
> class SC {
> string f = "SC";
> void show() {writeln(this.f);}
> }
> class C : SC {
> string f = "C";
> }
> void main () {
> auto c = new C();
> writeln(c.f) ; // OK, got "C"
> c.show() ; // expected "C", got "SC"
>
> // below test for type
> if (
They are handly for boiler plate code that you sometimes just can't
avoid.
When you do that stuff template mixins are nicer to work with than
string mixins
Yeah, mixin string generation functions are just cumbersome and unreadable.
On Sat, 06 Nov 2010 14:48:44 -0400
bearophile wrote:
> spir:
>
> > What is the common idiom to check whether the type of a given element is
> > what I expect?
> > Seems that
> > typeof(e) == Type
> > is refused by the compiler, for any reason? I get
> > DeeMatch.d(237): Error: type stri
I have this little program:
import std.stdio;
import std.stream;
void main ()
{
Stream file = new BufferedFile("spec.txt");
foreach(ulong n, string line; file) {
stdout.writefln("line %d: %s",n,line);
}
file.close();
}
which is basicall a cut-n-paste from
http://digitalmars.com/d/2.0/phobos/s
spir:
> What is the common idiom to check whether the type of a given element is what
> I expect?
> Seems that
> typeof(e) == Type
> is refused by the compiler, for any reason? I get
> DeeMatch.d(237): Error: type string is not an expression
I don't know why the language refuses a na
spir wrote:
> Hello,
>
>
> What is the common idiom to check whether the type of a given element is
> what I expect? Seems that
> typeof(e) == Type
> is refused by the compiler, for any reason? I get
> DeeMatch.d(237): Error: type string is not an expression
> I'm using
> typeof(e).stringof == "
Hello,
What is the common idiom to check whether the type of a given element is what I
expect?
Seems that
typeof(e) == Type
is refused by the compiler, for any reason? I get
DeeMatch.d(237): Error: type string is not an expression
I'm using
typeof(e).stringof == "TypeName
On 2010-11-06 11:13, Don wrote:
Trass3r wrote:
In the past template mixins were a neat special usecase of templates.
Now with the "mixin template()" syntax they've become a separate thing
because you can add special code for handling them, e.g. allowing them
to add constructors to classes.
The
On 06/11/2010 10:13, Don wrote:
Trass3r wrote:
In the past template mixins were a neat special usecase of templates.
Now with the "mixin template()" syntax they've become a separate thing
because you can add special code for handling them, e.g. allowing them
to add constructors to classes.
The
Trass3r wrote:
In the past template mixins were a neat special usecase of templates.
Now with the "mixin template()" syntax they've become a separate thing
because you can add special code for handling them, e.g. allowing them
to add constructors to classes.
The question is: what is their rig
Trass3r wrote:
In the past template mixins were a neat special usecase of templates.
Now with the "mixin template()" syntax they've become a separate thing
because you can add special code for handling them, e.g. allowing them
to add constructors to classes.
The question is: what is thei
In the past template mixins were a neat special usecase of templates. Now
with the "mixin template()" syntax they've become a separate thing because
you can add special code for handling them, e.g. allowing them to add
constructors to classes.
The question is: what is their right to exist?
13 matches
Mail list logo