[Swift-devel] [Bug 200] New: Add global variables to swift

bugzilla-daemon at mcs.anl.gov bugzilla-daemon at mcs.anl.gov
Wed Apr 15 15:07:56 CDT 2009


https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=200

           Summary: Add global variables to swift
           Product: Swift
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SwiftScript language
        AssignedTo: benc at hawaga.org.uk
        ReportedBy: wilde at mcs.anl.gov


This started with a request based on coding oops.swift:

The motivation for this particular case was to fetch the @arg values (4 to 6
now, but growing) all in the "main" proc, but have their values available to
several levels of deeper proc calls, without passing all the values down all
the way.

What the code does now is fetch the @args at multiple levels, which I thought
was not elegant.  I suspect that is further use for globals in normal coding
style.

-- email comment from Ben:

That has bothered me in the past too. I think its fine to do - it doesn't 
introduce the ickiness that global variable do because they're single 
assignment (so really, global constants)


file an enahnement request for that too

-- email comment from Mihael:

Some form of lexically scoped constants are probably a good idea.

-- 
Configure bugmail: https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching the reporter.



More information about the Swift-devel mailing list