With the advent of TypeScript, classes, etc one feature I liked from scala
is: `???`, the [Predef.???](
https://www.scala-lang.org/api/current/scala/NotImplementedError.html)
token.
Basically, you can place `???` which would type as whatever the method is
typed as (for things like Typescript, Symbol definitions, etc.), and when
run, throws the "NotImplementedError".
This is useful when writing libraries or other code -- more readable that
"cannot call undefined" when the method is missing, and a nice placeholder
for young APIs.
This is basically the same as writing: `throw new Error('Unimplemented')`.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss