02.10.2013 22:47, bearophile пишет:

It's often a good idea to use typeof to keep the code more DRY and safer.


I'm sure keeping the code dry and clean is very good idea, but using typeof is rather verbose and just is unusual and verbose a little bit.

Another possible solution is to put the variables in some kind of tuple,
take its types and use them with a trailing [] to pass them all to
receiveOnly.

Bye,
bearophile

Something like this:

alias Tuple!(
    typeof(request_id),
    typeof(zoom),
    typeof(x),
    typeof(y),
    typeof(path),
    typeof(url)
) TileDescription;

// wait for tile descripton to process
auto msg = receiveOnly!TileDescription();

? I didn't understand about trailing []

Reply via email to