mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-04 11:10:27 +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
|
||||
primitives by letting them defer a call to a GOOPS generic function on
|
||||
argument mismatch. This functionality is enabled with the GOOPS
|
||||
primitive
|
||||
|
||||
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.
|
||||
argument mismatch. This menas that there is no loss of efficiency in
|
||||
normal evaluation.
|
||||
|
||||
Example:
|
||||
|
||||
(use-modules (oop goops))
|
||||
(enable-primitive-generic! +)
|
||||
(use-modules (oop goops)) ; Must be GOOPS version 0.2.
|
||||
(define-method + ((x <string>) (y <string>))
|
||||
(string-append x y))
|
||||
|
||||
|
@ -209,7 +200,8 @@ Example:
|
|||
can also be used for concatenating strings.
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue