Re: global vars and #:declarative? (was [critical bug] The set! doesn't work in indirect reference)

Linus Björnstam <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <[email protected]>
On Thu, 19 Sep 2024, at 17:33, Taylan Kammer wrote:
> On 
> If I'm not mistaken: Using a local variable is often more efficient 
> than using a global variable, so if you needed to micro-optimize code 
> for maximum efficiency, you would want to do this
> There's one potential issue with using parameters like this: Their 
> value is thread-local. If you change a parameter's value from one 
> thread, with the setting syntax above (calling it on a value), it will 
> never become visible to other threads that are currently executing. 

You could implement a macro with boxes and identifier macros that lets you define "non-declarative" variables that hides the box operations from the users.  That should be simple, but might make some issues downstream if they start doing macro voodoo.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.