Arrow-macros provides Clojure-like arrow and diamond wand macros for Common Lisp, enabling expressive and readable threading of expressions.
Arrow-macros is a Common Lisp library that implements Clojure-style arrow macros and diamond wands from swiss-arrows. It provides macros for threading values through nested function calls, enhancing code readability and conciseness by reducing nesting and clarifying data flow in functional-style Lisp programming.
Common Lisp developers writing functional-style code who want to improve readability and reduce nesting in expression-heavy pipelines, particularly those familiar with or inspired by Clojure's threading constructs.
Developers choose arrow-macros for its direct port of Clojure's threading macros and swiss-arrows' diamond wands to Common Lisp, offering a lightweight, efficient implementation without a code walker dependency, plus unique features like the <!> symbol to safely handle side effects in diamond wands.
Arrow-macros provides Clojure-like arrow macros in Common Lisp
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Direct implementation of Clojure's arrow macros like -> and ->>, making it easy for developers familiar with Clojure to write readable, linear code in Common Lisp, as stated in the README.
Unique <!> symbol in diamond wands ensures expressions with side effects are evaluated only once, preventing unintended multiple evaluations, demonstrated with HTTP request examples in the README.
Supports nesting of diamond wands for complex transformations, enhancing expressiveness, as shown in the README examples with nested wands.
Independence from a code walker makes the library smaller and more efficient, noted in the README's changelog about fixes and slimming.
Diamond wands have test failures on ABCL, Allegro, and CLISP, as per the README notes, limiting its reliability across all Common Lisp environments.
Even with the <!> symbol, managing side effects in threaded expressions requires careful attention to avoid bugs, and the README warns about risks in diamond wands.
Primarily beneficial for functional programming styles; may not integrate well with imperative or object-oriented codebases, reducing its general applicability.