[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use/mangle checked in.



Anonymous CVS (see info at Wiki) now has use/mangle support checked
in.  This is relevant for those of you who want to do things like:

(use/mangle tests/manglea a:)
(use/mangle tests/mangleb b:)

(a:func-a)
(a:func-b)
(b:func-a)
(b:func-b)

All it does is import everything exported by the module in question,
but with the given prefix mangled on to the binding name.

For those who were desiring module:binding, this is equivalent to what
you wanted, although it's usable for other things too.  For example,
you could also bind on "mail-" instead, or something like that.

This should help deal with the instinct of prefixing method names
yourself, out of a fear of name collisions.  (Eg, earlier I found
myself prefixing "mail-" onto functions just because I was concerned
about binding collisions with something more important.)  Note that I
am one of those people would ideally like a unified generic system
without the constraints on the number of parameters, but this is a
useful thing regardless, and very helpful in the short term.

IMPORTANT!

I've checked in new .c files and a new binary as well because the
boot-strapping issues require you to either just build your image from
the C files/use the binary, OR you must go through the boot-strapping
process yourself to get yourself a happy image.  Specifically, the
use/mangle export in src/goo/boot.goo requires that the running image
must have the use/mangle export already loaded.  So to build it
yourself, you must remove the export, build an image, then build a new
image using the new image, with the xport re-exported.  (It's possible
there's a way around this, but I'm not one of the people who knows how
to do it, if so.)

Andrew

PS-- You'll want to (use goo/boot) to get at this I think.