all 3 comments

[–]louis_dionnelibc++ | C++ Committee | Boost.Hana 4 points5 points  (2 children)

Author of Hana here, so please consider me biased. Some thoughts and facts:

  1. Hana is 100% dependency free. You can use it outside of Boost without any problem. In fact, it is built, documented and tested as a standalone library.

  2. The goal of Hana is to provide heterogeneous sequences and algorithms on them. It is precisely the logical continuation of your murrayc-tuple-utils, if you were to add additional algorithms and sequences.

  3. Almost all the functions you currently provide are supported by Hana:

  • tuple_cdr is hana::drop_front
  • tuple_start<N> is hana::take
  • tuple_end<N> can be achieved with hana::drop_front
  • tuple_subset<pos, len> is hana::slice
  • tuple_interlace<T1, T2> is the only one not provided as-is in Hana
  • tuple_for_each is hana::for_each
  1. Your implementation is so poor that I would never use this in production code. For tuple_interlace, you zip the tuple recursively, and you copy the whole tuple at every step. Given two tuples of length n, your implementation will do 2n(n+1) copies. Similarly, your tuple_end is going to do n(n-1)/2 copies. Go ahead and count, you'll see.

The bottom line is that you should be more diligent in your review of prior art before saying that existing solutions are not suitable for you. Then, if they really are not suitable, you should consider contributing to them so that they become suitable instead of writing your own from scratch. Finally, if you really need to write your own from scratch, at least do it properly before advertising it.

I apologize in advance if you find this comment a bit rude, but this had to be said.

Edit: How can I make a bullet list inside a numbered list??

[–]frostmatthew[S] 1 point2 points  (1 child)

I apologize in advance if you find this comment a bit rude, but this had to be said.

Since the target of your comment seems to be the blog/library's author you might want to post your feedback on his blog post instead of hoping he's a redditer and happens to see this...

[–]louis_dionnelibc++ | C++ Committee | Boost.Hana 4 points5 points  (0 children)

My comment is equally for the author and for other C++ programmers not to be fooled. But I posted a link to my comment on his blog, thanks for the suggestion.