Am Mittwoch, 17. April 2013, 21:58:28 schrieb Alan Manuel Gloria: > On Wed, Apr 17, 2013 at 8:06 PM, Arne Babenhauserheide <arne_...@web.de>wrote: > > > At Wed, 17 Apr 2013 06:39:37 +0800, > > almkglor wrote: > > > Macros were not standard until R4RS, either (although most Scheme systems > > > pre-R4RS did have a Common Lisp-like unhygienic macro system). A better > > > > I did not know that… I had thought that lisps had macros from very early > > on. > > > > Going seriously off-topic, but well...
I don’t consider the history of Lisp to be off-topic when we’re discussion what will hopefully be part of its future :) > (define-macro (example x) > `(foo ,x)) > > and consider what happens when it's used in a context where 'foo is bound > locally: > > (let ((foo #t)) > (example foo)) > ==> > (let ((foo #t)) > (foo foo)) > On a Lisp-2, (foo foo) means "call the globally-bound function named 'foo > with the current value of the variable 'foo". Common Lisp augments this > further with an excellent package system that essentially changes (?) a > symbol's identity - 'foo in one package does not evaluate to the same > symbol as 'foo in another package unless it's been imported (if I > understood Common Lisp correctly, LOL). In a Lisp-1 like Scheme, it means > "call the current value of the variable 'foo with itself." Schemers also > prefer not to use Common Lisp's package system, often using lexical binding > to provide some kind of package system. > > This lead to a lot of research into "hygienic macro expanders", which I > *think* is not yet *quite* resolved today (there are two main branches of > hygienic macro expanders, the syntax-case branch and the > syntactic-closures/explicit-renaming branches, the syntax-rules system can > be implemented on top of either, Andre van Tonder did an implementation > that supposedly implements both syntax-case and explicit-renaming (but not > syntactic-closures, I think) It’s strange to see that many problems in what I consider as one of the most powerful feature of Lisp. > Most coders would put a single module's code inside a single file, with > one-file-per-module. So it's not an issue, if it's in the file, it's part > of the module, indentation or no indentation Is there some automatism for that? > > Can the module reuse defines outside the module to avoid that? > > > > > Most module systems allow importing another module's exported bindings, and > few might be able to import "global" bindings, whatever "global" might mean > for your Scheme system's module system. Is “top-level in the file” global? For example in Python you have to jump through some hoops if you want to use a function as method, but it is possible for most cases (there is the module functools dedicated to that and related hackery…). Thanks for your background info! Best wishes, Arne -- singing a part of the history of free software: - http://infinite-hands.draketo.de
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss