« Return to Thread: scaladoc is not uptodate with latest release?

Re: scaladoc is not uptodate with latest release?

by Zemian Deng :: Rate this Message:

Reply to Author | View in Thread

Ahh, thank you both Thomas and Darshan. It make more sense now.

For the scaladoc, the @depreated is NOT stated under summary section,
but it's in the detail section of the method instead, which I missed
it. Thanks again for correcting me. I do wish the "deprecated" is
added to Summary section as well though( I think javadoc does this.)

Cheers,
-Z

On Thu, Jun 19, 2008 at 3:04 PM, Thomas Chust <chust@...> wrote:

> Zemian Deng wrote:
>
>> [...] I just found out that scala.collection.mutable.Map
>> has deprecated method += that's not showing on scaladoc. [...]
>
> Hello,
>
> the method +=(key: A): MapTo that you refer to is documented and correctly
> marked as deprecated in the released scaladoc.
>
>> [...] I like the old deprecated method better than the new suggested way.
>> Is there better reason for this change other than require more typing?
>
> I think you are simply experiencing trouble with operator precedence and
> ambiguity of parentheses here.
>
>> val m = new HashMap[String, Int]
>> m += "one"->111 // warning: [...]
>
> Try
>
>  m += ("one" -> 111)
>
>> m += Pair("two", 222) //the new way
>> m += ("two", 222) // and this product error!
>
> Try
>
>  m += (("one", 111))
>
>> What is your take on the deprecated method?
>
> I fully agree that having a method named += which doesn't add an element to
> a collection but rather returns some strange object that is capable of
> performing the addition via its method called -> is a bad idea and rather
> counterintuitive. The new solution to take a Tuple2 as a parameter and to
> have the implicit conversion from Any to ArrowAssoc is much more to my
> taste.
>
> cu,
> Thomas
>

 « Return to Thread: scaladoc is not uptodate with latest release?