17.09.2012 17:53, bearophile пишет:
 From this long Reddit post:
http://www.reddit.com/r/haskell/comments/zxcks/haskell_vs_f_vs_scala_a_highlevel_language/c68ybn1


I have seen this linked page:
https://github.com/non/kind-projector

Where it introduces a (fragile) Scala syntax like:
Tuple3[Int, ?, ?]

That is similar to this D, but it's usable in-place:
template IntFirst3(T2, T3) { alias Tuple!(int, T2, T3) IntFirst3; }

A comparable hypothetical D syntax, for partial template application:
Tuple!(int, ?, ?)

Being it usable in-place, you can use it as:

static asssert(is(Tuple!(int, ?, ?)!(double, float) ==
                   Tuple!(int, double, float)));

It's a fun syntax: Foo!?

Bye,
bearophile

Just want to mention about existent (and more flexible than this syntax) library solution.
Search for `Bind` here:
https://bitbucket.org/denis_sh/misc/src/tip/stdd/typetuple.d

--
Денис В. Шеломовский
Denis V. Shelomovskij

Reply via email to