Skip to main content
More info
Source Link
tgoossens
  • 215
  • 2
  • 7

As far a as my understanding goes:

Multimethods are a generalization of method polymorphism.

A multimethod consists of 2 parts

  1. A name

  2. A dispatch method: which will produce a dispatch value

OverloadingBased on this dispatch value, the appropriate method will be chosen. Overloading is a special case of multimethods where the dispatch method will return the static type as a dispatch value

In general, the dispatch method can be anything. It can return other values than the type.

As far a as my understanding goes:

Multimethods are a generalization of method polymorphism.

A multimethod consists of 2 parts

  1. A name

  2. A dispatch method: which will produce a dispatch value

Overloading is a special case of multimethods where the dispatch method will return the static type as a dispatch value

In general, the dispatch method can be anything. It can return other values than the type.

As far a as my understanding goes:

Multimethods are a generalization of method polymorphism.

A multimethod consists of 2 parts

  1. A name

  2. A dispatch method: which will produce a dispatch value

Based on this dispatch value, the appropriate method will be chosen. Overloading is a special case of multimethods where the dispatch method will return the static type as a dispatch value

In general, the dispatch method can be anything. It can return other values than the type.

Source Link
tgoossens
  • 215
  • 2
  • 7

As far a as my understanding goes:

Multimethods are a generalization of method polymorphism.

A multimethod consists of 2 parts

  1. A name

  2. A dispatch method: which will produce a dispatch value

Overloading is a special case of multimethods where the dispatch method will return the static type as a dispatch value

In general, the dispatch method can be anything. It can return other values than the type.