From: Ken A. <kan...@bb...> - 2002-09-05 21:38:37
|
No. (F.load) should install the value of all top level symbols, macros or not. IE the effect of (F.load) and (load "F.scm") should be the same, except that the macros and procedures are compiled. k At 05:16 PM 9/5/2002, Timothy Hickey wrote: >On Thursday, September 5, 2002, at 04:55 PM, Graham Spencer wrote: >>Timothy Hickey wrote: >> >> > We could also automatically compile macro1.scm when the (load >> > "macro1.scm") expression is compiled in macro2.scm or we could just >> > scan through it and pull out the macro definitions..... >> >>I like this sort of approach better than an include statement because it >>means that as a user of a library, I don't have to remember which >>definitions are functions and which are macros. If macros and functions >>are handled differently, then a library provider would have to create two >>separate files so that the user could do: >> >> (include "mylib-macros.scm") >> (load "mylib.scm") >> >>Ideally, the macro definitions would be saved in the java file so that >>they would work even if the user was loading a compiled .class file, e.g. >>(mylib.load). This would guarantee that (load "mylib.scm") and >>(mylib.load) always had the same semantics. It would also allow JScheme >>libraries to be distributed as .class/.jar files. > >This is an interesting point. It would be nice to be able to distribute >libraries as class files >and to have > (load F.scm) >be equivalent to > (F.load). >but this suggests that the compiled class should provide a way of >accessing the defined macros >so that the compiler can extract the macros from the .class file as easily >as from the .scm file, e.g. > (F.getMacros) >could return a hashtable containing the macros defined in the Swing.scm >library. > >---Tim--- > > > >------------------------------------------------------- >This sf.net email is sponsored by: OSDN - Tired of that same old >cell phone? Get a new here for FREE! >https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user > |