I couldn’t believe it when I first encountered this:
val i = 01 //Error: Decimal integer literals may not have a leading zero. (Octal syntax is obsolete.)
It is completely understandable that the octal syntax was confusing, but I think it is important for better code alignment in some decimal use-cases:
val mySeq1 = (0012, 1234, 2536, 9911) val mySeq2 = (2020, 0010, 1111, 9911)
I propose we bring it back behind a compiler flag, just in case we want to prevent old octal codebases from silently breaking when migrating. For Scala 3, I think all have moved on from octal numbers, so the flag can be removed.