
Am Mittwoch, 25. Mai 2005 01:45 schrieb Jérémy Bobbio:
On Wednesday 25 May 2005 01:09, Daniel Fischer wrote:
What about a type synonym? I think
type CreateParents = Bool
The thread started about readability at the call site. Using a type synonym for Bool needs to figure out what this "True" at call site means instead of understanding it right away.
Quite, I didn't think of that yesterday.
What about adding to the Daniel's definition:
don'tCreateParents :: CreateParents don'tCreateParents = False createParents :: CreateParents createParents = True
I like that!
I'm not finding this fancy as the library user is not required to use them. Using constructors also emphasis which are options and which are not.
Cheers, Jérémy.
Cheers, Daniel