Skip to main content
Commonmark migration
Source Link

###suspicious identifier: ?

suspicious identifier: ?

You can use ? as identifier:

val l=List(1,2,3)
val? =List(1,2,3)

Here it doesn't save you anything, because you can't stick it to the equal sign:

val ?=List(1,2,3) // illegal

But later on, it often saves one character, since you don't need a delimiter:

print(?size)  // l.size needs a dot
def a(? :Int*)=(?,?tail).zipped.map(_-_)

However, it is often tricky to use:

       print(?size)
3
       print(?size-5)
<console>:12: error: Int does not take parameters
       print(?size-5)
              ^

###suspicious identifier: ?

You can use ? as identifier:

val l=List(1,2,3)
val? =List(1,2,3)

Here it doesn't save you anything, because you can't stick it to the equal sign:

val ?=List(1,2,3) // illegal

But later on, it often saves one character, since you don't need a delimiter:

print(?size)  // l.size needs a dot
def a(? :Int*)=(?,?tail).zipped.map(_-_)

However, it is often tricky to use:

       print(?size)
3
       print(?size-5)
<console>:12: error: Int does not take parameters
       print(?size-5)
              ^

suspicious identifier: ?

You can use ? as identifier:

val l=List(1,2,3)
val? =List(1,2,3)

Here it doesn't save you anything, because you can't stick it to the equal sign:

val ?=List(1,2,3) // illegal

But later on, it often saves one character, since you don't need a delimiter:

print(?size)  // l.size needs a dot
def a(? :Int*)=(?,?tail).zipped.map(_-_)

However, it is often tricky to use:

       print(?size)
3
       print(?size-5)
<console>:12: error: Int does not take parameters
       print(?size-5)
              ^
Mod Removes Wiki by Doorknob
Source Link
user unknown
  • 4.6k
  • 31
  • 31

###suspicious identifier: ?

You can use ? as identifier:

val l=List(1,2,3)
val? =List(1,2,3)

Here it doesn't save you anything, because you can't stick it to the equal sign:

val ?=List(1,2,3) // illegal

But later on, it often saves one character, since you don't need a delimiter:

print(?size)  // l.size needs a dot
def a(? :Int*)=(?,?tail).zipped.map(_-_)

However, it is often tricky to use:

       print(?size)
3
       print(?size-5)
<console>:12: error: Int does not take parameters
       print(?size-5)
              ^