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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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