On Wednesday, 30 August 2017 at 16:45:19 UTC, data pulverizer wrote:
One thing that confused me was examples like this ...

@method
Matrix _plus(DiagonalMatrix a, DiagonalMatrix b)
{
  // just add the elements on diagonals
  // return a DiagonalMatrix
}

Which is marked as returning a DiagonalMatrix rather than a Matrix by polymorphism however the function is marked Matrix return type.

Indeed returning a DiagonalMatrix would work, and is marginally more useful (in case you want to call the specialization directly). I'll update the example. Thanks.

Reply via email to