How can i make function with a different implement...
# compose-desktop
l
How can i make function with a different implementation on windows than in linux. Is this the use case for expect/atual?
a
can either be an interface, implemented differently on windows and linux. Or can be expect/actual. It really depends with the details. However, almost always favour interfaces, if you encounter limitations, go for expect/actuals
l
but do i make a module for windows code and one for linux code? How do I know which one to implement during build?
t
You can use
System.getProperty("os.name")
l
thanks a lot that's what i was looking for.