Skip to content
jacius edited this page Nov 24, 2012 · 4 revisions

Introduction

This reference guide describes the primitive API, a collection of low-level procedures that are used to construct the high-level API that most users will use. All the procedures described here are available in the protolk-primitives module. The primitive API is useful for customizing Protolk. However, you should normally not use any of these methods directly in your application code, only in the definition of custom high-level abstractions.

Note: the primitive API is much less stable than the normal API, i.e. it is more likely to change between versions. You should consider these procedures subject to change unless the description of the a procedure explicitly says that it is "API stable".

pob Record Type

%make-pob

Procedure: (%make-pob ...)

The low-level constructor for pobs. Do not use this procedure, ever. Instead, use the make-pob procedure from the normal API, which wraps this procedure in a more API-stable interface.

pob?

Procedure: (pob? VALUE)

Returns #t if VALUE is a pob, or #f if it is some other type of value. This procedure is API stable. (In Protolk 0.5, this procedure is only available in the primitive API, but in the future it will also be available in the normal API.)

%pob-base / %pob-set-base!

Procedure: (%pob-base POB)
Procedure: (%pob-set-base! POB BASE)

Get or set the pob's base. These procedures are API stable.

%pob-props / %pob-set-props!

Procedure: (%pob-props POB)
Procedure: (%pob-set-props! POB PROPS-LIST)

Get or set the pob's props list. These procedures are not API stable, because the internal representation of the props list may change in the future. You should instead use the procedures described in the "Props" section, below.

%pob-methods / %pob-set-methods!

Procedure: (%pob-methods POB)
Procedure: (%pob-set-methods! POB METHODS-LIST)

Get or set the pob's methods list. These procedures are not API stable, because the internal representation of the methods list may change in the future. You should instead use the procedures described in the "Methods" section, below.

%pob-prop-resolver / %pob-set-prop-resolver!

Procedure: (%pob-prop-resolver POB)
Procedure: (%pob-set-prop-resolver! POB PROP-RESOLVER)

Get or set the pob's prop resolver. These procedures are API stable. See Advanced Customization for more information about prop and method resolvers.

%pob-method-resolver / %pob-set-method-resolver!

Procedure: (%pob-method-resolver POB)
Procedure: (%pob-set-method-resolver! POB METHOD-RESOLVER)

Get or set the pob's method resolver. These procedures are API stable. See Advanced Customization for more information about prop and method resolvers.

Props

%has-prop?

%prop

%resolve-prop

%set-prop!

%unset-prop!

Methods

%has-method?

%method

%resolve-method

%set-method!

%unset-method!

Method Context

%method-context

%active-pob

%active-method-name

Super Methods

%super-context

%same-super-context?

%super-invoked-procs

%super-resolve-next-method

%start-super

%continue-super

%super

%super*

Clone this wiki locally