Let me correct that for you
That is essentially the way it is done in Scala (2004), F# (2005), *ActionScript 3 (2006)*,
Go (2009), Rust (2010), Kotlin (2011), TypeScript (2012), and Swift (2014) programming languages.