You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IsaacShelton edited this page Mar 21, 2022
·
1 revision
Statement Scope
Statement scope is an invisible scope that surrounds every statement
The primary way that statement scope impacts the program, is by ensuring that dropped temporary values are properly cleaned up.
import basics
func main {
// We are ignoring the returned String, which requires deconstruction
// This destruction is taken care of by the invisible statement scope
getName()
}
func getName() String {
return "Isaac".clone()
}