Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

edited monomorphisation explanation #36

Merged
merged 1 commit into from Jan 12, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -424,9 +424,9 @@ call it on ints, we have one version.

Neat! We get specialized versions, but only specialized for the types we
actually use. No generating code that's useless. This process is called
'monomorphization,' which basically means we take one thing (mono) and
change it (morph) into other things. To simplify, the compiler takes
this code:
'monomorphization,' which basically means we take something that can work
with things of different types and change it (morph) into specialized
(mono) versions. To simplify, the compiler takes this code:

~~~ {.rust}
fn print_vec<T: ToStr>(v: &[T]) {