I think the problem is that three different things are needed, and that these 
need different (often pre-existing) keywords (or defaults). I'd suggest:

* Global storage by default for consts

* Promotion to global storage where possible and useful, for const and 
immutable values

* A "shared" keyword for globally (or perhaps parent threadgroup- ?) visible 
variables,  with atomic access by default, for the level of item defined (int, 
struct, etc.)

* An "unsafe" keyword, used in "unsafe shared" to get what C programmers call 
"global".

* PERHAPS some sort of Lockable interface, supporting acquire() and release(), 
for custom, "shared" aggregates which ned more granular locking control.

-- 
Lee





-------- Original message --------
From: Thad Guidry <[email protected]> 
Date:  
To: Graydon Hoare <[email protected]> 
Cc: [email protected] 
Subject: Re: [rust-dev] const, static, global, mut, syntax! 
 
History: Static comes from the Greek "statikos" meaning fixed or unmoving.

More History: Static memory or Dynamic memory (same for accesses) has been used 
since 1959+

TIP: Avoid overloading at all costs (the bane of other ill conceived 
programming languages)


It sounds like everyone is really just trying to come up with a term that 
denotes a "lifetime" of a variable were that variable could also have many 
altered states 2 of which being "mutable" or "immutable" or even sets of states 
down the line ?

So other choices are:

fixed
firm
stable
survive(d)
aged
living (not dead yet)
live (still not dead yet)
bound

If your talking about coming up with a term that denotes a "scope" of a 
variable, then your choices are ...

global
;
Completely depends on what your really trying to denote or define.

-- 
-Thad
http://www.freebase.com/view/en/thad_guidry
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to