Skip to content

Commit

Permalink
Added editorial note.
Browse files Browse the repository at this point in the history
  • Loading branch information
chromatic committed Jul 16, 2010
1 parent 3ae798c commit 8ac231b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/multi-dispatch.pod
Expand Up @@ -256,6 +256,12 @@ This restriction allows a clever compiler optimization: it can sort all
candidates by narrowness once to find the candidate with the best matching
signature by examining nominal type constraints. These are far cheaper to check than constraint checks. Constraint checking occurs next, then the compiler considers the nominal types of candidates.

=for author

I could use a table or figure here to illustrate the hierarchy of narrowing.

=end for

With some trickery it is possible to get an object which conforms to a built-in
type (C<Num>, for example) but which is also an undefined value. In this case
the candidate that is specific to C<Num> wins, because the nominal type check
Expand Down

0 comments on commit 8ac231b

Please sign in to comment.