Deprecated argument names

2011-03-08 Thread bearophile
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

Re: Deprecated argument names

2011-03-08 Thread spir
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

Re: Deprecated argument names

2011-03-08 Thread Jim
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

Re: Deprecated argument names

2011-03-08 Thread spir
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) = ..

Re: Deprecated argument names

2011-03-08 Thread renoX
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

Re: Deprecated argument names

2011-03-08 Thread Jim
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: > >>> >

Re: Deprecated argument names

2011-03-08 Thread bearophile
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

Re: Deprecated argument names

2011-03-08 Thread Jonathan M Davis
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