guile-user
[Top][All Lists]
Advanced

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

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


From: Linus Björnstam
Subject: Re: global vars and #:declarative? (was [critical bug] The set! doesn't work in indirect reference)
Date: Fri, 20 Sep 2024 06:40:42 +0200

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]