Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Re: Seeking computer-programming job (Sunnyvale, CA)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Series Expansion, post: 3863158"] This is a non-sequitur. That would require the macro to be able to examine the contents of the scope containing the call site. Which means moving more things into the macro's arguments from outside, so that they're available to the macro's code to examine. The macro eventually grows to absorb the entire calling function; every macro then has additional part-of- function-before-macro's-job and part-of-function-after-macro's-job arguments. When you want to have *multiple* macro calls inside a single function, then the fun really begins, as the macros have to avoid tripping over *each other*. A combinatorial explosion ensues. I'm gratified that you apparently realize this. None are desired or necessary. It sounds like Scheme's do something like auto-create a nested scope, as if #define wrapped things in an implicit brace pair. This solves variable capture but not variable hiding or multiple evaluation. To be more "hygienic" (= encapsulated like regular functions) one supposes it would also need to evaluate its actual arguments once, in left to right order, assigning to local variables named the formal parameter names. At this point, it's only half a macro; indeed, it's really just an always-inlined function. My guess is that Scheme macros are not any more encapsulated than Lisp macros with respect to multiple evaluation issues, so implementation changes to a Scheme macro can still screw up some call sites. The variable hiding issue would also remain. Tell me again what macros get you that closures don't? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Re: Seeking computer-programming job (Sunnyvale, CA)
Top