Is it ever good practice in Kotlin to use an `open...
# codingconventions
h
Is it ever good practice in Kotlin to use an
open
class as opposed to
abstract class
,
sealed class
, or
interface
?
m
it’s not a bad practice on its own, but being a strong language design trait (Item 17 of Effective Java http://mishadoff.com/blog/effective-java/), it just forces you to think twice if you need that class to be extended and design it accordingly. The other kind of classes or interface all have their purpose, so it basically depends on what’s best for your design
👍 1