I'm not after new features specifically (though thats useful) or implementation/bug issues but more things that the language could do better or things that it should do that it currently doesnt...
To start the ball rolling heres one from me:
Cobra does local variable creation (and type inference) on first assignment. It annoys me that it doesnt do the same thing on first use of an out Param variable.
If you dont explicitly prior declare the Param variable you get a compile error.
Currently (as a for instance) you must do something like
- Code: Select all
result as String?
if dict.tryGetValue(key, out result)
print result
rather than just
- Code: Select all
if dict.tryGetValue(key, out result)
print result
# If the lookup returned the value and a success code it would just work via creation on assignment feature
ok, result = dict.tryGetValue(key)
if ok, print result