epoch-language
epoch-language copied to clipboard
C# "var" or C++11 "auto" feature
Introduce a keyword (probably "var") which indicates that a variable's type
should be inferred from its initializer.
var this_will_be_an_integer = 42
var this_will_be_a_real = 3.14159
var this_will_be_a_string = "test"
var this_will_be_a_boolean = false
var this_will_be_a_compile_error = "some", "aggregate", "type"
// Given:
foo : integer x -> return y = x + 1
var this_will_be_a_function = foo
Original issue reported on code.google.com by [email protected] on 15 Feb 2012 at 8:22
Personally, i prefer var. Its so much shorter than auto. (no really, it is)
Original comment by [email protected] on 15 Feb 2012 at 8:27