On 9/28/10 13:27 PDT, Philippe Sigaud wrote:
On Tue, Sep 28, 2010 at 09:50, Shin Fujishiro<[email protected]>  wrote:
Philippe Sigaud<[email protected]>  wrote:
I mean, static tuple algorithms should be able to handle tuples composed
of heterogeneous entities: types, symbols and/or constants.

Agreed. Ok, any compile-time sorcery on template-y arguments tuples.

I must say that a very healthy approach is to not be extravagant without solid use cases. There are lots of things that look cute and interesting in this style of programming, and getting carried away is probably the #1 risk.

  It will
allow us to write something like follows in a short, functional style:

  Struct!(int, "x", double, "y")
  http://gist.github.com/600535

Nice!

Isn't that as good as Tuple?

Thanks. That's strange, D has wonderfully powerful metaprogramming
abilities, but no one seems to care. How many languages can offer a
statically checked mapping of a polymorphic function on a
heterogeneous list, in a few lines of code?
And it's not just an esoteric goal: you can transform structs.tupleof
or function arguments as you wish!

It's fine if the traction is little in the beginning. There has been very little initial traction for some stuff I've done too. Some never gained traction, but some did. If it's good, people will notice.


Andrei
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to