Data Transformation

FP transformations are straightforward to test by checking function output for a given input. The FP data transformation example uses a pure function that filters negatives and returns doubled values without stored state. The OOP data tran…

1 sources - 4 claims

FP transformations are straightforward to test by checking function output for a given input. The FP data transformation example uses a pure function that filters negatives and returns doubled values without stored state. The OOP data transformation example wraps numbers inside a Processor class and stores them as object properties. OOP data transformation can create unnecessary state when the data could be processed statelessly.