Closed ghost closed 6 years ago
@Yardanico
proc fun2():auto=return
fun2()
# fun2 # expression 'fun2()' has no type (or is ambiguous)
void fun2(){}
fun2; // calls fun2()
I've updated the readme, I'll let you close this if you're satisfied with that: https://github.com/timotheecour/D_vs_nim/commit/5f9d69907b36a5a567bc4b81a8b997b7d368c312
@timotheecour The third one is probably ambiguous because you can do that:
proc a() = echo 5
let b = a
a() # echoes 5
b() # echoes 5
right I understand the reasonning behind the difference in syntax; the update i made clarified the difference, closing
I think Nim does support optional parens, for example:
Or do you mean something else by optional parens?