Boost logo

Boost :

Subject: Re: [boost] Hana Typeclass
From: Robert Ramey (ramey_at_[hidden])
Date: 2014-08-03 18:30:59

Louis Dionne wrote
> Robert Ramey
> <ramey <at>
>> writes:
> Looking at all the discussions about concepts and comments about type
> classes
> that Hana has brought up, I really think I messed up when I tried to
> answer
> the "what are type classes" question in the documentation. The docs
> marketed
> them as something they were not (an implementation of concepts) and poorly
> reflected my own view. I'm working on fixing this (and other aspects of
> the
> documentation).

Your library needs concepts - just as fusion does. I don't see how your
"type class" is different. In fact, looking at my haskell book, I don't see
how haskell type classes are different either. (maybe a little - but not

> For now, I'd rather have people think of type classes as a Boost.Fusion
> tag
> dispatching system on steroids.

what's tag dispatching? - OK - just kidding (only partially). But to me
really an implementation technique and making it a center piece of the
documentation doesn't uses understand this. To me, the documentation
should be:

parameterized types
  compile time

One thing that the documentation needs is a good motivating example(s).
The user should be able to look at this and in 1/2 hour know how this is
going to make his life easier. Here's an example

the 8 queens problem:

a) class C++ solution using mutable objects, containers, etc.
b) solution using HANA
  1) why it's more verifiably correct
  2) why it's shorter
  3) why it's faster
  4) why it's faster than the same algorithm rendered in Haskell
c) scale to N queens



Unsubscribe & other changes:

View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at