Skip to end of metadata
Go to start of metadata

Just to quickly summarize an idea for further implementation on Fantom just for fun.
The idea is to enable multiple dispatch. Probably the same ideas can be further expanded to full-featured pattern matching.

  1. Everything will be implemented in a single dispatch.pod.
  2. There will be one class Dispatch with api like this:

    Thus, anyone can construct a dispatcher like this:

  3. There also will be DSL plugin to enable Dispatch construction at compile-time (with proper error generation if possible) and facet @DispatchFunc, so the following code will be allowed (need to check whether current DSL API allows it):
  4. In method mode, by involving default param values, one more interesting feature can be enabled (synthetic example):
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.