Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Swift Introduction to Swift in Ruby
@josephku
370,000
Safe
Modern
Power
No base class
@objc
Playground
Visual REPL
Use constant
let
var
Unicode
π
String Interpolation
let name = "Afu"
let age = 3
let greetings = "Hi! My name is (name).
My human age is (age * 7)"
println(greetings)
puts "Hi! I am #{name}. My human age is #{age * 7}"
Array & Dictionary
Array & Hash
1..10
1…10
if true {
println("only me!")
}
Functional
Programming
Structure & Class
Extensions
500.repeatitions { println("Me again!") }
500.times { puts "Me again!" }
Tuple
let someTuple: (Double, Double) = (3.14159, 2.71828)
?
var serverResponseCode: Int? = 404
serverResponseCode = nil
Optional Chaining
num = paul.residence?.address?.buildingNumber?.toInt()
RubyMotion
C’mon, it’s Ruby!!
?
Thank you!
Swift Introduction to Swift in Ruby
Swift Introduction to Swift in Ruby
Swift Introduction to Swift in Ruby
Swift Introduction to Swift in Ruby
Upcoming SlideShare
Loading in …5
×

Swift Introduction to Swift in Ruby

777 views

Published on

2014-06-17 Presented on Ruby Tuesday #29

Published in: Technology, Education
  • Be the first to comment

Swift Introduction to Swift in Ruby

  1. 1. Swift Introduction to Swift in Ruby
  2. 2. @josephku
  3. 3. 370,000
  4. 4. Safe Modern Power
  5. 5. No base class
  6. 6. @objc
  7. 7. Playground
  8. 8. Visual REPL
  9. 9. Use constant
  10. 10. let var
  11. 11. Unicode
  12. 12. π
  13. 13. String Interpolation
  14. 14. let name = "Afu" let age = 3 let greetings = "Hi! My name is (name). My human age is (age * 7)" println(greetings)
  15. 15. puts "Hi! I am #{name}. My human age is #{age * 7}"
  16. 16. Array & Dictionary
  17. 17. Array & Hash
  18. 18. 1..10 1…10
  19. 19. if true { println("only me!") }
  20. 20. Functional Programming
  21. 21. Structure & Class
  22. 22. Extensions
  23. 23. 500.repeatitions { println("Me again!") }
  24. 24. 500.times { puts "Me again!" }
  25. 25. Tuple
  26. 26. let someTuple: (Double, Double) = (3.14159, 2.71828)
  27. 27. ?
  28. 28. var serverResponseCode: Int? = 404 serverResponseCode = nil
  29. 29. Optional Chaining
  30. 30. num = paul.residence?.address?.buildingNumber?.toInt()
  31. 31. RubyMotion
  32. 32. C’mon, it’s Ruby!!
  33. 33. ?
  34. 34. Thank you!

×