January 2020
Intermediate to advanced
532 pages
13h 31m
English
In the trading application we described previously, we could utilize parametric types to simplify the code and make it more reusable when adding future trading instruments.
It is quite clear that SingleStockTrade and SingleStockOptionTrade are almost the same. In fact, even the function definitions of sign and payment are identical. In this very simple example, we only have two functions for each type. In practice, we could have many more functions, and it would become quite messy.
Read now
Unlock full access