« Return to Thread: [scala] Numeric symbols?

[scala] Numeric symbols?

by Eric Willigers :: Rate this Message:

Reply to Author | View in Thread


Welcome to Scala version 2.7.5.final
scala> val a = '1
<console>:1: error: missing terminating quote
        val a = '1
                ^

Welcome to Scala version 2.8.0.r18236-b20090708020214
scala> val a = '1
a: Symbol = '1

Is the change in behaviour intended?


I'm enjoying Wampler and Payne's upcoming book, it is making me check
things I thought I understood.
http://programming-scala.labs.oreilly.com/ch02.html#SymbolLiterals

 « Return to Thread: [scala] Numeric symbols?