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
On 03/08/2011 09:29 AM, bearophile wrote:
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
spir Wrote:
> On 03/08/2011 09:29 AM, bearophile wrote:
> > 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 gi
On 03/08/2011 02:43 PM, Jim wrote:
spir Wrote:
On 03/08/2011 09:29 AM, bearophile wrote:
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 'deprecated' assertion is not about *language* changes but about
API changes.
I think that warning are a good compromise for changing API: can you
suggest something better?
BR,
renoX
spir Wrote:
> On 03/08/2011 02:43 PM, Jim wrote:
> > spir Wrote:
> >
> >> On 03/08/2011 09:29 AM, bearophile wrote:
> >>> 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:
> >>>
>
spir:
>I read 2-3 times Walter thinks warnings are bad. Things are either correct, or
>not.<
D compiler has the "-d" switch that allows deprecated features.
The old name becomes an alias of the true argument name when the "-d" is
used... but maybe a less blunt switch is better.
auto somefunc
On Tuesday, March 08, 2011 10:11:12 bearophile wrote:
> spir:
> >I read 2-3 times Walter thinks warnings are bad. Things are either
> >correct, or not.<
>
> D compiler has the "-d" switch that allows deprecated features.
>
> The old name becomes an alias of the true argument name when the "-d" is