paulirotta / Tantalum

Tantalum Cross Platform Library
12 stars 6 forks source link

Rename doInBackground() to do() #5

Closed vivainio closed 11 years ago

vivainio commented 11 years ago

doInBackground is too verbose, and can be confusing when the operation doesn't happen in the background (it can happen on UI task as well)

paulirotta commented 11 years ago

SoMetImEsigEtcARRiedaWaywiThloNgCAMeLcaSenaMeS

I checked and do() is not a valid Java identifier. It could be shorter, but then it would be less familiar and obvious slot-in to the Android users that are using doInBackground() as part of the AsynTask implementation. Kind of a long name, but keeping the 'droids in the loop with a drop-in cross platform replacement for the Android class was why this name was chosen. I think we have gone far better than what Android offers, but but opinions are opinions.

http://developer.android.com/reference/android/os/AsyncTask.html

vivainio commented 11 years ago

Yes, let's try to make it cooler than what Android has :).

How about using exec()? Can we remove the "other" use of exec() from the lib?

paulirotta commented 11 years ago

doInBackground() is now exec()