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

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -