motivation: it's very beneficial for the protocols to use functions with concrete types because then there's no need for specialisation. At compile time, the compiler can often not know what concrete type will be used so it needs to create a 'generic at runtime' version of the function. If however all functions on the protocol do not use generics, there's no need for a 'generic at runtime' version of the function changes: * change CounterHandler::increment to take Int64 instead of <DataType: BinaryInteger> * change RecorderHandler::record to take Int64 and Double instead of <DataType: BinaryInteger> and <DataType: BinaryFloatingPoint> * adjust example and test implementation * adjust docs |
||
|---|---|---|
| .. | ||
| Example1.swift | ||
| ExampleMetricsLibrary.swift | ||
| Quantiles.swift | ||
| RandomLibrary.swift | ||
| SimpleMetricsLibrary.swift | ||
| main.swift | ||