3 ms·
I'd say the language design and language ecosystem has a LOT to do with it as well. Here are a few lines of Java that I just had to write about 10 minutes ago.
by dheera 12y ago
I'd say the language design and language ecosystem has a LOT to do with it as well. Here are a few lines of Java that I just had to write about 10 minutes ago.
PendingResult<MessageApi.SendMessageResult> pending = Wearable.MessageApi.sendMessage(mGoogleApiClient, mWearableNode.getId(), path, data);
pending.setResultCallback(new ResultCallback<MessageApi.SendMessageResult>() {
@Override
public void onResult(MessageApi.SendMessageResult result) {
....
}
}
Okay, now suppose this were a Python-based API instead? Perhaps it could be something like this, after some relevant initialisation:
wearable.sendmessage(mywearable, path, data)
@wearable.onresult
def onresult(result):
...
Tell me which one is more in need of commenting.