syntax - Java version of OCaml underscore -
if i'm testing like
corrector c = new filecorrector("filenotfound.txt");
and know code fail, , c
never used, there way can write code ocaml _
symbol?
corrector _ = new filecorrector("filenotfound.txt");
why not not give variable name?
new filecorrector("filenotfound.txt");
it looks odd because constructors shouldn't have side-effects. can throw, , literally can have side effects, it's not code doesn't anything. , far eclipse warnings concerned, preferred unused variable.
Comments
Post a Comment