Skip to content

Commit 37e5539

Browse files
authored
Improve clarity of consolidated protocol's optimisation (#13811)
1 parent defad93 commit 37e5539

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/lib/protocol.ex

+2-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ defmodule Protocol do
222222
are known up-front, typically after all Elixir code in a project is compiled,
223223
Elixir provides a feature called *protocol consolidation*. Consolidation directly
224224
links protocols to their implementations in a way that invoking a function from a
225-
consolidated protocol is equivalent to invoking two remote functions.
225+
consolidated protocol is equivalent to invoking two remote functions - one to
226+
identify the correct implementation, and another to call the implementation.
226227
227228
Protocol consolidation is applied by default to all Mix projects during compilation.
228229
This may be an issue during test. For instance, if you want to implement a protocol

0 commit comments

Comments
 (0)