-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove or update typelevel.md ? #5955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 19, 2019
valencik
added a commit
to valencik/dotty
that referenced
this issue
Feb 8, 2020
nicolasstucki
added a commit
that referenced
this issue
Feb 9, 2020
Fix #5955: Remove typelevel relationship doc
gabro
pushed a commit
to gabro/dotty
that referenced
this issue
Feb 11, 2020
In this file there was a description of code specialization. Do you know where I can find it now, as AFAICT it still works. Code Specialization Inline methods are a convenient means to achieve code specialization. As an example, consider implementing a math library that implements (among others) a dotProduct method. Here is a possible implementation of MathLib with some user code. abstract class MathLib[N : Numeric] {
def dotProduct(xs: Array[N], ys: Array[N]): N
}
object MathLib {
inline def apply[N : Numeric] = new MathLib[N] {
def n = Numeric[N]
def dotProduct(xs: Array[N], ys: Array[N]): N = {
require(xs.length == ys.length)
var i = 0
var s = n.zero
while (i < xs.length) {
s = s + xs(i) * ys(i)
i += 1
}
s
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/lampepfl/dotty/blob/master/docs/docs/typelevel.md is outdated and is therefore misleading, can we delete it because it's subsumed by other doc pages or should it be updated ?
The text was updated successfully, but these errors were encountered: