Deprecated argument names

bearophile bearophileHUGS at lycos.com
Tue Mar 8 00:29:49 PST 2011


I don't know much about Scala language, so I've found this small funny thing in the Lambda the Ultimate blog. In Scala parameter names can be deprecated:

def somefunction(@deprecatedName('x) y: Int) = ...

This gives deprecation warning to callers using the parameter name x.


More info. In Scala annotations are user-defined, I presume, have methods, etc.:

http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/scala/deprecatedName.html

This helps against one of the problems Don has with named arguments.

Bye,
bearophile


More information about the Digitalmars-d mailing list