Created
July 21, 2014 19:05
-
-
Save jdee/8ffe94322de97dcb6dc4 to your computer and use it in GitHub Desktop.
evolution of computing languages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C (1972): | |
// for (char letter='A'; letter <= 'Z'; ++ letter) { | |
// Ruby (1995): | |
// [A..Z].each { |letter| | |
// drum roll, please | |
// Swift (2014): | |
let alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // Hope I didn't mistype that. And never accidentally modify it. | |
assert(countElements(alphabet) == 26) // better check, and make one line into three :| | |
for letter in alphabet { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment