ptal / expected

What did you expect?
113 stars 18 forks source link

[Monads] rename unexpected_category/unexpected_traits by erroed_category/errored_traits #49

Closed viboes closed 10 years ago

viboes commented 10 years ago

To conform with the file name.

I agree the name errored is not so good, but it is better to be coherent.

Wi will change it to a better name when we find it.

ptal commented 10 years ago

And what about "exceptional"?

viboes commented 10 years ago

The errored catefory works now with any kind of errors, not just exceptions.

This doesn't mean that exceptional is not a good name. BTW, I named unexpected first exceptional ( and it is yet there in Boost.Thread as exceptional_ptr).

ptal commented 10 years ago

Does unexpected wasn't good because it's the "dual" of expected?

viboes commented 10 years ago

Sorry, I don't understand.

Are you proposing that the category and the concept be unexpected. unexpected is already used in the standard :(. This is why I have named the class wrapping the error unexpected_type and not unexpected_type.

Any better suggestion for unexpected_type is welcome.

Anyway we can not rename the concept errored to an existing class, as we can not use optional for the concept valued. They live on the same std namespace.

Maybe as you suggested we could use maybe for valued.

An alternative could be to use CamelCase for concepts as ConceptLite does.