Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the triple question mark mean in scala?

Tags:

I can't seem to find what it does anywhere. For example say you have a method such as

def SomeFunction(a: String): String ={        ??? } 

What do the triple question marks signify?

like image 383
Zee Avatar asked Jul 08 '15 19:07

Zee


People also ask

What is the use of triple question mark in Scala?

it has a return type of Nothing which is a sub-type of every type and can therefore be used in place of any return value.

What does 3 question marks mean?

A lot of question marks in a text can define the feeling of confusion and anger. A single question mark is for asking a question; multiple question marks, or multiple question marks along with exclamation points are for expressing confusion. It is outright rude and should never be used.

Is question mark a string?

In a URL, the query starts with a question mark - the question mark is used as a separator, and is not part of the query string. If you also include a question mark in the query string, this would be treated as a literal question mark (i.e. it has no significance beyond that of a regular character).


1 Answers

??? is defined in Predef and simply throws a NotImplementedError:

def ??? : Nothing = throw new NotImplementedError 

it has a return type of Nothing which is a sub-type of every type and can therefore be used in place of any return value.

like image 114
Lee Avatar answered Sep 17 '22 01:09

Lee