Re: Declare reference to variable ?

2013-07-29 Thread yaz
Oh, it doesn't work when accessing member data. Sorry for the noise.

Re: Declare reference to variable ?

2013-07-29 Thread yaz
You don't need to use dereference operator. Example: http://dpaste.dzfl.pl/d34c23e5 import std.stdio; struct Foo { void answer() { writeln("As you wish!"); } } void main() { Foo veryVeryLongNamedStruct; auto v = &veryVeryLongNamedStruct; v.answer(); }

Re: Interacting between two different programs

2013-06-29 Thread yaz
On Saturday, 29 June 2013 at 06:08:28 UTC, Jeremy DeHaan wrote: I've been toying around with the idea of working on an IDE, mostly because I think it would be an interesting/fun project to work on. In any case, the only thing I cannot seem to wrap my head around is how programs like Code Blocks

Re: Mixin Templates Over-restricted?

2013-05-25 Thread yaz
On Saturday, 25 May 2013 at 18:28:09 UTC, Diggory wrote: I think you can do it using a string mixin instead: enum Test = `writeln("Hello D People!")` void main() { mixin(Test); } The answer to your question is probably that D has to know the context for a template mixing at the point wher

Mixin Templates Over-restricted?

2013-05-25 Thread yaz
Is there a reason for restricting mixin templates to only include declarations? For example, the following code doesn't work. (http://dpaste.dzfl.pl/1582a25e) Looking at the language specification (http://dlang.org/template-mixin.html) this doesn't seem to be an implementation limitation. im