[Swift-devel] globally readable variables

Mihael Hategan hategan at mcs.anl.gov
Mon Jun 22 11:17:59 CDT 2009


On Mon, 2009-06-22 at 08:12 +0000, Ben Clifford wrote:
> It seems desirable to make some kind of global variable in SwiftScript. I 
> will not repeat the arguments here.
> 
> There seem two obvious syntax choices:
> 
> i) all top level variables become readable at all scopes.
> 
> ii) top level variables may be annotated with a "global" modifier

I would like to express my strong preference for "constant" or "const"
instead of "global".

>  to make 
> them accessible at all scopes; otherwise they are accessible only in the 
> same places they presently are accessible, the top level scope and its 
> subscopes.
> 
> I'm aware of a preference from one person for i) and a slight preference 
> from another for ii) - does anyone have partcular thoughts?
> 




More information about the Swift-devel mailing list