www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [TDPL] function type syntax

I was browsing the TDPL chapter on concurrency, when I found this signature:

void setMaxMailboxSize(Tid tid, size_t messages, bool(Tid) onCrowdingDoThis);

(in the "Mailbox Crowding" subsection)

I'm interested by onCrowdingDoThis type: bool(Tid), as it's the first time I
see such a syntax: T(U) t

It seemed quite natural to consider it a function/delegate/callable taking a
Tid and returning a bool, and that's indeed what's implied by the text.

It doesn't work with DMD 2.040, so I was just curious: new feature, simplified
code to avoid clutter in the book, bug, or Easter egg?


Philippe
Feb 17 2010