Idiotmatic D

Meta jared771 at gmail.com
Tue Feb 4 15:05:39 PST 2014


On Tuesday, 4 February 2014 at 22:53:30 UTC, Andrej Mitrovic 
wrote:
> On 2/2/14, Brian Schott <briancschott at gmail.com> wrote:
>> We all know how nice well-written idiomatic D code looks, but I
>> think it's time that we try to really explore the full power of
>> the language.
>
> D is the tersest language around, just observe how I can make
> functions returning functions with ease:
>
> void main()
> {
>     (() => (){})()();
> }

I call this one the Programmer's Hairbrush:

void main()
{
	(()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 ()=>
	 (){}
	 )
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	()
	;
}

http://dpaste.dzfl.pl/490d5e6707f8


More information about the Digitalmars-d mailing list