A generic function interface to standard Common Lisp functions, providing extensible wrappers for equality, comparison, sequences, and more.
GENERIC-CL is a Common Lisp library that provides generic function wrappers for standard operations like equality testing, comparison, and sequence manipulation. It solves the problem of having multiple, type-specific function names (e.g., `eq`, `=`, `equal`) by offering a single, extensible interface that works across built-in and user-defined types.
Common Lisp developers who want to write cleaner, more consistent code by using a unified API for common operations, especially those building libraries or applications with custom data types.
Developers choose GENERIC-CL because it reduces API complexity, eliminates the need to invent new function names for custom types, and offers performance optimizations via static-dispatch, making generic calls as efficient as ordinary function calls in many cases.
Generic function interface to standard Common Lisp functions
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Replaces multiple built-in functions like `eq`, `=`, and `equal` with a single `=` function, simplifying equality checks across symbols, numbers, lists, and strings.
Allows defining methods for user-defined classes and structures, enabling a consistent API for equality, comparison, and sequence operations without inventing new function names.
Built on static-dispatch to optimize generic function calls when types are known at compile-time, making them as efficient as ordinary function calls in many cases.
Wraps not just equality but also comparison, copying, iteration, and hash-table functions, providing a comprehensive generic interface for common operations.
Generic function calls have inherent overhead if argument types are not known at compile-time, which can impact performance in dynamically typed or runtime-heavy code.
Achieving optimal performance requires using static-dispatch, adding complexity and setup steps that may not be intuitive for all developers.
Other Common Lisp libraries may expect standard function calls, leading to interoperability issues when integrating GENERIC-CL into mixed codebases.