I was reading some of the examples of writing a quine with D, but apparently the language has evolved and they no longer compiled unchanged.

So I tried to program one by myself using strings and std.stdio, but the result seems long and redundant:

import std.stdio;void main(){string s=`import std.stdio;void main(){string s=writefln("%s\x60%s\x60;s",s[0..38],s,s[38..$]);}`;writefln("%s\x60%s\x60;%s",s[0..38],s,s[38..$]);}

Any ideas for a shorter version (preferably without using pointers)?

Reply via email to