code formatting issue

bearophile bearophileHUGS at lycos.com
Wed Oct 2 08:47:19 PDT 2013


Alexandr Druzhinin:

> auto msg = receiveOnly!(
> 	typeof(request_id),
> 	typeof(zoom),
> 	typeof(x),
> 	typeof(y),
> 	typeof(path),
> 	typeof(url)
> )();
>
> Or may be I'm worrying about nonsense and better I'd start 
> thinking about more useful things? :)

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

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


More information about the Digitalmars-d-learn mailing list