Do you work as software developer in a company? I guess not . (Also I don't but I made some internships): If you talk like that in a company you're fired immediately I guess . Code is always wrong at first. There is no genius that codes bugless code. Thus safety just speeds up the production of really bugless code since you can make less and only less serious bugs. You even do not need a typed language with this logic. Datatypes are just there to protect you from errors . So back to assembler . But enough of that, I know what you wanna say. And also I sometimes wanna do such hacks . I wish we still had pointers... Your example does not work. Neither the first, nor the second. Since ++ uses java / C semantics. And those semantics say that the operand must be a correct LValue. Method invocations are no correct LValues, so you should get an error here. Be sure, my inlining will be that clever . foreach syntax: This one. As it is java syntax. I am not quite sure how it will work. Probably with an Iterator. Your datastructure must provide a getIterator() method that returns and properly initializes an iterator (here, it should be set on your "first" element). The iterator has then the next and hasNext methods. The iterator will be deleted after the loop has finished.