https://kotlinlang.org logo
#announcements
Title
# announcements
s

scott

06/14/2017, 6:48 PM
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

radityagumay

06/14/2017, 10:50 PM
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
3 Views