Skip to content

Commit

Permalink
Merge pull request #21353 from JuliaLang/jb/fix21352
Browse files Browse the repository at this point in the history
fix #21352, update dev docs on type specificity
  • Loading branch information
JeffBezanson authored Apr 12, 2017
2 parents c1c3c99 + 5a565ff commit d91a719
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/src/devdocs/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ mysubtype(Tuple{Array{Int,2}, Int8}, Tuple{Array{T}, T} where T)
## Subtyping and method sorting

The `type_morespecific` functions are used for imposing a partial order on functions in method
tables (from most-to-least specific). Note that `jl_type_morespecific(a,b)` really means "is `a`
at least as specific as `b`?" and not "is `a` strictly more specific than `b`?"
tables (from most-to-least specific). Specificity is strict; if `a` is more specific than `b`,
then `a` does not equal `b` and `b` is not more specific than `a`.

If `a` is a subtype of `b`, then it is automatically considered more specific.
If `a` is a strict subtype of `b`, then it is automatically considered more specific.
From there, `type_morespecific` employs some less formal rules.
For example, `subtype` is sensitive to the number of arguments, but `type_morespecific` may not be.
In particular, `Tuple{Int,AbstractFloat}` is more specific than `Tuple{Integer}`, even though it is
Expand Down

2 comments on commit d91a719

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

Please sign in to comment.