naming conventions - JavaScript - Advisability of closing and returning state in a single method -


my team debating right name ui framework javascript method following:

  1. it gets widgets state, if any
  2. it removes widget page
  3. it returns retrieved state framework can recreate later

the proposed name 'destroy.' team members feel people may not expect method named destroy return anything. name 'getstateanddestroy' more descriptive suggests single responsbility principle failure.

thoughts? see more of naming or design issue?

git has similar, name stash.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -