[rust-dev] tutorial on interfaces: bounded type parameters

Graham Fawcett graham.fawcett at gmail.com
Thu Jan 12 13:10:57 PST 2012

Hi folks,

The following paragraph appears in the new tutorial on interfaces:

  The useful thing about value polymorphism is that it does not have to be
  static. If object-oriented languages only let you call a method on an object
  when they knew exactly which sub-type it had, that would not get you very
  far. To be able to call methods on types that aren't known at compile time,
  it is possible to specify 'bounds' for type parameters.

Note the phrase "aren't known at compile time." That reads as if bounded types
offer runtime polymorphism. (They don't, do they?)


More information about the Rust-dev mailing list