Last active
February 22, 2017 18:56
-
-
Save raclettes/86c8cb0d2c0cc013c5368d64594fc064 to your computer and use it in GitHub Desktop.
It's new Ruby, it's Tie
This file contains 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
# Ruby is this: | |
print "name?: " | |
name = gets.chomp | |
puts "Hi #{name}" | |
# Tie is this, yes its type safe, but not OOP: | |
gets "name?: " |> name # string is inferred due to gets returning string | |
puts "Hi #{name}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment