The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
def convert(value : String) : Array(String)
instead of def convert(value : String, kind : Array(String).class)
convert
method to Test::Configuration
instead of having them infect all other types... i guess i'm still thinking functional
Int32 | Bool | String
tho
square()
macro, that takes 1 argument and multiplies it by itself. Because macros take in AST nodes and output AST nodes, and are expanded before the semantic analysis, such an invocation could be: x = 4; square(x += 1)
, which would expand into code that basically does (x+=1) * (x+=1)
, that is, the side effect of incrementing x is evaluated before the second occurence of x is evaluated, giving a wrong answer. I'm not sure if I explained that well enough...