- [Todo] Support for extensible, pattern-matching bind on constrained context
- Enumeration (pattern match on individual values)
- Range (pattern match on range groups)
- [Todo] Utility abstractions (as value or context)
- Enum
- [Idea] Resilience primitives
- [Idea] Retries - doable via fallbacks
- [Idea] Circuit breakers
- [Idea] Bulkheads / semaphores
- [BREAKING CHANGE] Drop support for ClojureScript 1.9
- Due to
javax.xml.bind.DatatypeConverterexceptions with Java 9+
- Due to
- [BREAKING CHANGE] Contexts holding value (e.g. failure and thrown) must implement
promenade.type/IHolder- New protocol
promenade.type/IHolderis introduced- To hold a value, as a substitute for
IDeref - Because
clojure.lang.IDerefis a Java interface - cannot be extended tojava.lang.Throwable
- To hold a value, as a substitute for
- Built-in failure and thrown implementations are updated to implement
promenade.type/IHolder
- New protocol
- Optimize exception handling by avoiding unwanted wrapping/unwrapping
- Overload
Throwable(CLJ) andjs/Error(CLJS) withIThrownandIHolder - Do not wrap exception as
Thrownif already aThrown(true in most cases)
- Overload
- Add fast, stackless alternative to
ex-info- Drop-in replacement for
ex-info - Add Java class and CLJS type
promenade.util.StacklessExceptionInfo- descendant ofExceptionInfo promenade.util/se-infopromenade.util/se-info?promenade.util/!se-infopromenade.util/!wrap-se-info
- Drop-in replacement for
- Add custom entity and failure definition support
promenade.util/defentitypromenade.util/defailure
- Perf tests
- Documentation
- Add docs for version
0.8.0 - Docstring cross-ref
- Formatting for Cljdoc
- Add Cljdoc badge
- Add docs for version
- Fix buggy handling of context as initial expression in
*->,*->>,*as->macros
- Allow
recurat the tail position in code body (impacting the following macros)promenade.core/mdopromenade.core/mletpromenade.core/when-mlet
- Add reducing thread macros
reduce->,reduce->>,reduce-as->- Support for early termination via
clojure.core/reduced - Support for custom bind functions
- Support for early termination via
- [BREAKING CHANGE] Accept
nilas argument inbind-maybenothing-handler- Consistent with other alt-handlers
- Base bind thread macros on reducing thread macros
either->,either->>,either-as->maybe->,maybe->>,maybe-as->- [BREAKING CHANGE] Nothing handler expression must handle the argument
trial->,trial->>,trial-as->
- Add
!wrapmacro to wrap functions to return thrown context on exception - Add support for reducing functions (that work with clojure.core/reduce, transducers)
refn- construct a reducing function that terminates on encountering a contextrewrap- wrap a reducing function such that it terminates on encountering a context
- Do not need to do
require-macrosat usage site (@awkay) - Improved documentation (@awkay)
- Factor out
doorelated namespaces into a separate directory - Make
Failure,NothingandThrowninstances printable at the REPL- Default printing: Multi method
print-method - Pretty printing using
clojure.pprint/pprint: Multi methodsimple-dispatch
- Default printing: Multi method
- Utility functions
- Predicate:
free?(to imply "context free" or "not context") - Branching:
branch
- Predicate:
- [BREAKING CHANGE] Do not implicitly return
nothing(or any context, unless the user asks for it)mdo(empty body)mlet(empty body)when-mlet(test fail, empty body)
- Doc: Improve section
Dealing with success and failure with Either - Test with muliple CLJS versions
- Add
mdoas an equivalent ofdoform- Context values are returned as soon as encountered
- Retrofit other forms using
mdomletwhen-mlet
- Add arity to specify 'default'
mfailuremthrown
- Fix issue where a context cannot be printed due to clash of types:
IPersistentMapandIDeref
- Fix issue where matching macros do not consider a context value to be a non-match
mletif-mletwhen-mletcond-mlet
- Add context pattern matching support
- Matcher fns:
mfailure,mnothing,mthrown - Bind macros:
mlet,if-mlet,when-mlet,cond-mlet
- Matcher fns:
- Add utility fn
thrownto wrap as thrown - Add predicate fns for context types
- Add ClojureScript support
- Make context types extensible
- Failure (Either): Protocol
promenade.type.IFailure - Nothing (Maybe): Protocol
promenade.type.INothing - Thrown (Trial): Protocol
promenade.type.IThrown
- Failure (Either): Protocol
- Context support
- Contract:
promenade.type.IContext - Utilities:
deref-context
- Contract:
- Either (Success/Failure)
- Utilities:
failure(constant),nil->failure,failandex-fail - Bind impl:
bind-either - Threading:
either->,either->>andeither-as->
- Utilities:
- Maybe (Just/Nothing)
- Utilities:
nothing(constant),nil->nothingandvoid - Bind impl:
bind-maybe - Threading:
maybe->,maybe->>andmaybe-as->
- Utilities:
- Trial (Result/Exception)
- Utilities:
! - Bind impl:
bind-trial - Threading:
trial->,trial->>andtrial-as->
- Utilities: