Lee Clagett
Is the issue the name, MPL11? These proposals seem to be more Fusion11. The
The name's not the issue. The new library is called Boost.Hana and as long as it does not conflict with anything, I'm unwilling to discuss it; that would be bikeshedding. It's just a name after all.
current MPL has type-computation and compile-time value computation. It supports sequences of types and sequences of homogeneous values. It seems that people want the compile-time value computation written in the runtime language, as opposed to the compile time language. I like this idea too. But I'm not seeing a reason to do type-computation in the runtime-language.
If doing so allows us to have a single library instead of two libraries with different interfaces, that's a reason. It would also mean that some functions written for runtime arguments could work as-is on types, which is an advantage. Finally, Matt Calabrese already pointed out the ease of debugging metaprograms. There might be other less obvious advantages too.
For example, take this in the current current MPL:
template<bool IsOrdered> struct Values { boost::mpl::if_c
::type values; }; And then in the runtime MPL that Louis posted earlier:
template<bool IsOrdered> struct Values { decltype(boost::mpl::if_c(declval(mpl::bool_<IsOrdered>), declval(std::set<int>), declval(std::unordered_set<int>))) values; };
With Boost.Hana, that would actually be
template <bool IsOrdered>
struct Values {
static constexpr auto values_t = if_(bool_<IsOrdered>,
type
That seems like a step backward to me. It is possible to "stitch" together the runtime and compile languages with the expanded "using" keyword, but is
I'm sorry, but I don't see how the "using" keyword helps at all here. Could you please expand? [...] Regards, Louis Dionne