Alexandr Druzhinin:
? I didn't understand about trailing []
I meant something more like this, but I don't know how much of an
improvement this is:
import std.typecons, std.typetuple;
template Foo(T1, T2) {
enum Foo = 1;
}
void main() {
int x;
float f;
enum y = Foo!(typeof
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
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 go
I'm curious what is the best way to code like this:
// request_id zoom x y pathurl
auto msg = receiveOnly!(size_t, zoom, uint, uint, string, string)();
or like this
auto msg = receiveOnly!(
typeof(request_id),
typeof(zoom),
typeof(x),