Document why to use concurrency over alternatives.

This commit is contained in:
Michael Walker 2016-09-10 12:39:34 +01:00
parent a0181bde42
commit 78834ca770
2 changed files with 39 additions and 0 deletions

View File

@ -30,6 +30,26 @@ it was split out into its own package.
The documentation of the latest developmental version is
[available online][docs].
Why and not something else?
---------------------------
- **Why not base:** like lifted-base, concurrency uses typeclasses to
make function types more generic. This automatically eliminates
calls to `lift` in many cases, resulting in clearer and simpler
code.
- **Why not lifted-base:** fundamentally, lifted-base is still using
actual threads and actual mutable variables. When using a
concurrency-specific typeclass, this isn't necessarily the case. The
dejafu library provides non-IO-based implementations to allow
testing concurrent programs.
- **Why not IOSpec:** IOSpec provides many of the operations this
library does, however it uses a free monad to do so, which has extra
allocation overhead. Furthermore, it does not expose enough of the
internals in order to accurately test real-execution semantics, such
as relaxed memory.
Contributing
------------

View File

@ -38,6 +38,25 @@ description:
This used to be part of dejafu, but with the dejafu-0.4.0.0 release,
it was split out into its own package.
.
== Why and not something else?
.
* Why not base: like lifted-base, concurrency uses typeclasses to
make function types more generic. This automatically eliminates
calls to `lift` in many cases, resulting in clearer and simpler
code.
.
* Why not lifted-base: fundamentally, lifted-base is still using
actual threads and actual mutable variables. When using a
concurrency-specific typeclass, this isn't necessarily the case.
The dejafu library provides non-IO-based implementations to allow
testing concurrent programs.
.
* Why not IOSpec: IOSpec provides many of the operations this
library does, however it uses a free monad to do so, which has
extra allocation overhead. Furthermore, it does not expose enough
of the internals in order to accurately test real-execution
semantics, such as relaxed memory.
.
See the <https://github.com/barrucadu/dejafu README> for more
details.