i mean if you really want to you could use the str...
# announcements
s
i mean if you really want to you could use the strategy pattern, which is often used for dealing with repetitive conditionals , https://sourcemaking.com/design_patterns/strategy
👍 1
r
scott: in java, we can use strategy pattern to mimic one task which have different manner. Let say's we have to have function which do a compression both of rar and zip. This will be fit to use strategy pattern. In functional programming world like kotlin. We can use a high order function to create extension function. Code will be more concise and convenient