Created
August 7, 2013 05:56
-
-
Save tarcieri/6171587 to your computer and use it in GitHub Desktop.
A crazy idea
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
# Reclaim Ruby's global variable syntax for type annotations! | |
# This could be done with a transpiler similar to TypeScript | |
def hello($String who) | |
puts "Hello, #{who}" | |
end | |
hello("world!") |
+1 to types and +1 to using whitespace to kill "end; end; end"
Ruby and whitespace isn't enough of a problem for significant whitespace not to be added in pronto.
@peterc This solves the whole 'end; end; end; end' problem: https://bugs.ruby-lang.org/issues/5054
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like this. (Despite having one "app" that uses global variables quite heavily - oh the shame, the shame..)
I think Ruby is quite ripe for having some sort of TypeScript-esque transpiler for a variety of things. One of my choices would be supporting significant whitespace to kill all the "end; end; end; end" stuff.