The message-oo Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The message-oo Reference Manual

This is the message-oo Reference Manual, version 0.9.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:21:31 2022 GMT+0.

Table of Contents


1 Introduction

Message OO

This package gives you the great opportunity of real object-oriented programming.

For example, you may write

(use-package :message-oo)

(defmessage list (:add item) (append list (list item)))
(defmessage list (:map func) (mapcar func list))
(defmessage list (:reduce func) (reduce func list))
(defmessage number (:+ number2 &rest numbers) 
   (apply '+ number number2 numbers))

(@ nil
   (:add 1)
   (:add 2)
   (:add 3)
   (:map (@ '(:+ 3) :fn))
   (reduce #'+)) => 15

You may think of last command as nil.add(1).add(2).add(3).map(..).reduce(...)

Every next step is applied to the result of previous as in UNIX shell pipeline.

Enjoy!


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 message-oo

Message-passing Smalltalk-style object system

Author

Roman Klochkov <kalimehtar@mail.ru>

License

BSD

Version

0.9.2

Source

message-oo.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 message-oo/message-oo.asd

Source

message-oo.asd.

Parent Component

message-oo (system).

ASDF Systems

message-oo.


3.1.2 message-oo/package.lisp

Source

message-oo.asd.

Parent Component

message-oo (system).

Packages

3.1.3 message-oo/src.lisp

Dependency

package.lisp (file).

Source

message-oo.asd.

Parent Component

message-oo (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 message-oo.mangle

Source

package.lisp.

Internals
  • fn (generic function).
  • generic (generic function).
  • tap∶ (generic function).

Previous: , Up: Packages   [Contents][Index]

4.2 message-oo

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Macros

Macro: @ (object message &rest more-messages)

Enables message pipelines
(@ l (:map (lambda (x) (process x)))) == (mapcar ...) (@ l (:map func) (:reduce #’+)) == (reduce (mapcar ..))

Package

message-oo.

Source

src.lisp.

Macro: defmessage (class-list message-list &body body)

It is smalltalk-like:
(defmessage container (:add item :after old-item) (container-add-after container item old-item))

Package

message-oo.

Source

src.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.1 Special variables

Special Variable: +mangle+
Package

message-oo.

Source

src.lisp.


5.2.2 Ordinary functions

Function: find-message (message)
Package

message-oo.

Source

src.lisp.

Function: for-generic (method-params)
Package

message-oo.

Source

src.lisp.

Function: method-name (message-list)

(:add item) -> message-oo.mangle:|ADD:|
(:add item :at pos) -> message-oo.mangle:|ADD:AT:|
:add -> message-oo.mangle:add
(:add item &rest rest) -> message-oo.mangle:|ADD::|
(:add item :at pos &rest rest) -> message-oo.mangle:|ADD:AT::|

Package

message-oo.

Source

src.lisp.

Function: method-params (message-list)
Package

message-oo.

Source

src.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

5.2.3 Generic functions

Generic Function: fn (object)
Package

message-oo.mangle.

Source

src.lisp.

Methods
Method: fn ((list list))

Returns function that can be applied to object
Example (mapcar (@ ’(:+ 3) :fn) (list 1 2 3 4)) => ’(4 5 6 7)

Generic Function: generic (object)
Package

message-oo.mangle.

Source

src.lisp.

Methods
Method: generic ((list list))
Generic Function: tap: (object func)
Package

message-oo.mangle.

Source

src.lisp.

Methods
Method: tap: (any func)

For debugging like in
(@ obj (:message1 ...) (:message2 ...) (:tap (lambda (x) (print x))) (:message3 ...))


Previous: , Up: Internals   [Contents][Index]

5.2.4 Conditions

Condition: bad-message
Package

message-oo.

Source

src.lisp.

Direct superclasses

error.

Direct slots
Slot: message
Initargs

message-oo::message


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
M   S  
Index Entry  Section

+
+mangle+: Private special variables

M
message: Private conditions

S
Slot, message: Private conditions
Special Variable, +mangle+: Private special variables

Jump to:   +  
M   S