-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating a place for some design considerations...
- Loading branch information
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# Some thoughts on design decisions and speculations | ||
# Thoughts and speculations on design | ||
|
||
## vars vs keywords | ||
## 0.2.0-SNAPSHOT | ||
|
||
### vars vs keywords | ||
|
||
`org.sbrubbles.conditio` uses keywords as identifiers for conditions and restarts, whereas `org.sbrubbles.conditio.vars` uses vars. The end API is quite different, and I'm not sure which I prefer... | ||
|
||
Using keywords: | ||
* Requires building up some machinery, but I feel demonstrates the concept of conditions better. | ||
* Requires building up some machinery, but I feel it's easier to understand and inspect; the data (conditions, available handlers and restarts) are explicit. | ||
|
||
Using vars: | ||
* Takes a lot of advantage of Clojure's preexisting functionality; so much the end result is effectively two macros, a condition and a function (`v/bind-fn`) that one could argue should be in Clojure's API directly. | ||
* It's a very thin layer over Clojure's preexisting functionality; just a couple of helper macros (and function). That minimalism is very appealing. | ||
* The concepts seem more... blurred together? For example, condition and signal are blurred together in defcondition, which effectively creates a specialized signal function. | ||
|
||
|