Menu

  • Home
  • Archives
  • Tags
  • RSS
July 31, 2014

possibly unevaluated variables


scala> def loop: Boolean = loop

<console>:10: warning: method loop does nothing other than call itself recursively

       def loop: Boolean = loop

                           ^

loop: Boolean



scala> true || loop

res34: Boolean = true



scala> true && loop



[need to Ctrl-C out at this point]

(I like that warning message!)


Tags: old-post

« scala slash haskell slash go scala var »

Copyright © 2020 Agam Brahma

Powered by Cryogen