Quick code design question: how do you usually han...
# getting-started
c
Quick code design question: how do you usually handle callbacks in your kotlin classes? The ol' java way of declaring an inner interface obviously works fine, but I'm always tempted to use lambdas instead. For example, when doing a custom dialog in Android, you might want callbacks for onOkPressed and onCancelPressed. Would you use an interface for this purpose or just pass in two lambdas in the constructor? What if you need more callbacks - when (if ever) do you switch over to using interfaces?