This page is no longer maintained — Please continue to the home page at www.scala-lang.org

hi there, just wondering: the

No replies
H-star Development
Joined: 2010-04-14,
User offline. Last seen 2 years 26 weeks ago.

hi there,

just wondering:
the compiler is able to optimize unused local symbols away. is there a way (via plugin, maybe?) to make it flag all unused symbols and return values as compile errors (except unit)?

unused return values make no sense when coding functional, so in a case like this:

val fullList = getFullList
val filtered = fullList.filter(...)
passResult(fullList)

or

val x = ...
x.filter(...)
next(x)

the compiler would notify me that something is wrong

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland