In studying Swift initially, I was quite interested to read about concepts that I wasn’t familiar with, and curious to know if these were brand new concepts invented by excited Apple engineers, or if they were inspired from other other languages. Turns out, in the main part they seem to be the latter.
Chris Lattner, the man pretty much responsible for Swift, writes on his home-page that he drew inspiration from “Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list.”
Tuples seems to draw inspiration from Python. Here’s an interesting commentary on the incorporation of tuples in Python in 1991 by the creators of Python and how they in turn drew inspiration from ABC from the early 1980s.
I initially suspected Optionals were a new concept but turns out they have a long history. Optionals exist in several languages that I’m not familiar with (nor had heard of to be honest!) – Haskell , OCaml, Scala, Standard ML, Rust and Java(well I’d heard of that one! Optionals introduced in version 8)
Functional programming and high order functions(filter, map, reduce) were definitely not a new concept, but interesting to follow the timeline of inspiration. Inspiration for functional programming was derived from Python (1994), Visual Basic 9(2007), C# 3.0(2007), PHP 5.3(2009), and C++11(2011)
Interesting to follow the history of ‘new’ concepts in Swift. Any others come to mind?
Leave a Reply