Why Nostr? What is Njump?
2023-05-24 13:27:50

benc on Nostr: #[0]​ I got an interesting question I’d like to hear your take on. Is there any ...

​ I got an interesting question I’d like to hear your take on.

Is there any wisdom when comparing the pros and cons of returning a value versus passing an interface?

// two options for handling a value.
class Foo {
int returnValue();
void passInterface(Handler);
}

interface Handler {
void handle(int);
}
Author Public Key
npub193q9lgp34868wzj2amqxkj2ely5kn4zkq5j7dp9mt94402spsdcqcz7fh8