Languages like Java and Scala allow you to annotate a method as deprecated
to signify that the method is no longer supported and will be dropped in the near future and that the users must switch to a suitable alternative. However, marking a Scala method with Java's annotation, i.e. @Deprecated
is not ideal. Rather, it is suggested that you use the Scala's annotation, i.e. @deprecated
as the former may or may not trigger the deprecated message.
@Deprecated()
def foo(): Unit = ???
@deprecated()
def foo(): Unit = ???