Hacker News new | ask | show | jobs
by agumonkey 3339 days ago
I see. Is the unused eliminated automatically on a later stage in the case of an affine type ?
1 comments

Not sure what you're asking here. Usually the semantics behind what happens to an unused variable (i.e. is the file automatically closed, etc.) come down to how the language is designed. It could be automatically destroyed (like RAII in C++) or it could just be forgotten.

In a purely functional language with affine types, unused variables are usually just optimized out.