Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which new features are (or will be) added to Scaladoc in Scala 2.10? [closed]

Among all the various incomplete lists of features going into Scala 2.10, there are various mentions of improvements to Scaladoc. But it's unclear which ones there are, and which ones are actually going in -- e.g. one of the lists of improvements says "fixes to Scaladoc" with links to various pull requests, some of which got rejected.

Can anyone summarize what's actually changed between Scala 2.9 and 2.10 milestone 4, and maybe indicate what else is planned for 2.10 itself?

Also, are they finally going to fix the problem of not being able to link to methods? E.g. littered throughout my code I have things like this:

/**
 * Reverse the encoding computed using `encode_ngram`.
 */
def decode_ngram(ngram: String): Iterable[String] = {
  DistDocument.decode_ngram_for_counts_field(ngram)
}

where I want to refer to another method in the same class, but AFAIK there's simply no way to do it. IMO it should be something obvious like [[encode_ngram]] -- i.e. I definitely shouldn't need to give an absolute class (which would make everything break as soon as I pull out a class and stick it somewhere else), and I shouldn't need to give the parameter types if the method name itself is unambiguous (i.e. non-polymorphic).

like image 641
Urban Vagabond Avatar asked Jul 06 '12 04:07

Urban Vagabond


1 Answers

Several new features, as well as many bugfixes are coming, but there's no definitive list of all the fixes that are in, yet. Of the more notable new features:

  • Implicitly added members will now be visible. A good example is to look at scala.Array, where methods like map which you might've assumed you had are now visible in the Scaladoc.
  • Automatically-generated SVG inheritance diagrams, for a bird's eye view of relationships between classes/traits/objects at the package-level and then also at the level of individual classes etc. For example, see the Scaladoc diagrams nightly at both the package-level (click "Content Hierarchy") as well as at the class-level.
  • Method-linking in some limited form should go into 2.10 (not in the nightly yet). (It's actually not totally trivial to implement in its complete form, due to practical stuff like overloading, as you noted.)
  • Improved use cases A member with a use case isn't doubly generated anymore, and they're now a bit clearer and simpler than before.
  • (Less-notable) Keyboard shortcuts for navigating Scaladoc have been added, they're explained here and here

For a more exhaustive list of bugfixes, it might be a good idea to write to scala-internals-- there's a good chance someone will compile a list of all major bugfixes in the past year for you there.

like image 149
Heather Miller Avatar answered Oct 09 '22 13:10

Heather Miller