Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/guicho271828/structure-interface

Non-CLOS, compile-time, inlined, fast method dispatching system
https://github.com/guicho271828/structure-interface

Last synced: 29 days ago
JSON representation

Non-CLOS, compile-time, inlined, fast method dispatching system

Awesome Lists containing this project

README

        

* Structure-Interface - Non-CLOS, compile-time, inlined, fast method dispatching system

*this library is abandoned.* I discarded the idea and moved on to /trivial-clos/.

+ /stick to the functions./
+ /stick to the structures and types./
+ /stick to the primitive control./

** Usage

Quick Look:

#+BEGIN_SRC lisp

(in-package :bag)

(define-interface bag-interface (bag content)
((emptyp `(function (,bag) boolean))
(insert `(function (,bag ,content) ,bag))
(delete1 `(function (,bag ,content) ,bag))
(get1 `(function (,bag) ,content))
(map-bag `(function (,bag (function (,content) t)) (values))))
:export t
:documentation "Interface for bag")

(in-package :bag.list)

(implement-interface (bag:bag-interface list t))

(defun bag.list:emptyp (list)
(null list))
...

#+END_SRC

[[https://github.com/guicho271828/structure-interface/wiki][Visit our wiki!]]

** Dependencies

This library is at least tested on implementation listed below:

+ SBCL 1.2.8 on X86-64 Linux 3.13.0-51-generic (author's environment)

Also, it depends on the following libraries:

+ lisp-namespace by Masataro Asai ::
Provides LISP-N --- extensible namespaces in Common Lisp.

+ immutable-struct by Masataro Asai ::
Library that encourage the use of functional programming + pattern matching

+ trivia by Masataro Asai ::
NON-optimized pattern matcher compatible with OPTIMA, with extensible optimizer interface and clean codebase

+ alexandria by ::
Alexandria is a collection of portable public domain utilities.

** Installation

** Author

+ Masataro Asai ([email protected])

* Copyright

Copyright (c) 2015 Masataro Asai ([email protected])

* License

Licensed under the LLGPL License.