Or make the mile-time calculation dependent on an instance's properties, which implies changing it to a instance-level method (or property here).
struct RunningWorkout {
var distance, time, elevation: Double
var mileTime: Double {
// This calculation doesn't involve elevation?...
return time / (distance / 1600)
}
}
let run = RunningWorkout(distance: 100, time: 20, elevation: 400)
print(run.mileTime)
BTW, Development-Compiler is for developing the compiler itself, not developing with the compiler. (The latter would include the former if we self-hosted. But Swift is written in C++, making it the only one of its contemporaries (Kolin, Rust, Go, Scala, etc.) that doesn't self-host.)