mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 04:00:26 +02:00
*** empty log message ***
This commit is contained in:
parent
d4c83f63ff
commit
daf516d661
1 changed files with 5 additions and 13 deletions
18
NEWS
18
NEWS
|
@ -187,21 +187,12 @@ documentation slots are not yet used.
|
||||||
|
|
||||||
It is now possible to extend the functionality of some Guile
|
It is now possible to extend the functionality of some Guile
|
||||||
primitives by letting them defer a call to a GOOPS generic function on
|
primitives by letting them defer a call to a GOOPS generic function on
|
||||||
argument mismatch. This functionality is enabled with the GOOPS
|
argument mismatch. This menas that there is no loss of efficiency in
|
||||||
primitive
|
normal evaluation.
|
||||||
|
|
||||||
enable-primitive-generic! PRIMITIVE ...
|
|
||||||
|
|
||||||
[This primitive will disappear again in Guile-1.4 when all primitives
|
|
||||||
will be primitive generics.]
|
|
||||||
|
|
||||||
It is then possible to extend the primitive(s) by defining methods for
|
|
||||||
them without loss of efficiency in normal evaluation.
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
(use-modules (oop goops))
|
(use-modules (oop goops)) ; Must be GOOPS version 0.2.
|
||||||
(enable-primitive-generic! +)
|
|
||||||
(define-method + ((x <string>) (y <string>))
|
(define-method + ((x <string>) (y <string>))
|
||||||
(string-append x y))
|
(string-append x y))
|
||||||
|
|
||||||
|
@ -209,7 +200,8 @@ Example:
|
||||||
can also be used for concatenating strings.
|
can also be used for concatenating strings.
|
||||||
|
|
||||||
Who will be the first one to extend Guile's numerical tower to
|
Who will be the first one to extend Guile's numerical tower to
|
||||||
rationals? :)
|
rationals? :) [OK, there a few other things to fix before this can
|
||||||
|
be made in a clean way.]
|
||||||
|
|
||||||
*** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
|
*** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue