naming conventions - Start -> end | stop | finish? -
i'm programming class , wondering pair of methods makes more sense describing process cycle:
start() -> stop() start() -> end() start() -> finish()
basically these methods called before , after executing task.
what i'm asking in english (specifically in programming - language -) pair more common see?
sorry i'm not native speaker hear 1 people prefer.
if not clear enough please let me know fix or add more info.
thank in advance.
update:
the intention of methods call "user functions" before , after running task. task nothing special.
update 2
i didn't want language i'm using (to make general), i'm doing jquery plugin , want users of plugin add custom functions triggered before , after executes main task. hope makes clear. thinking in using answer not jquery php/java.
it depends.
if calling method abort task or stop early, call
abort()
orstop()
.if calling method wait until task finishes, call
waitfor()
.if calling method perform final steps of task, call
finish()
.if calling method clean after task, call
dispose()
orcleanup()
.
languages have standard name such method; use it.update: if understand situation correctly, recommend
onstarted()
,oncompleted()
Comments
Post a Comment