DEV Community

Cover image for Stop naming functions `fetch()`.
Mike Stemle
Mike Stemle Subscriber

Posted on

Stop naming functions `fetch()`.

Hello everybody, this is just a quick PSA. Here goes: STOP NAMING YOUR FUNCTIONS fetch()!

Between the Fetch API, and the wide variety of modules involving functions named fetch(), we don't need any more functions named fetch().

Here are some alternatives:

  1. fetch_user_profile_from_email()
  2. load_remote_web_content()
  3. something_descriptive_that_will_challenge_your_typing_speed()
  4. literally_anything_other_than_fetch()
  5. there_are_a_lot_of_words_in_english_which_are_not_the_word_fetch()

But I digress.

In most of my years since I stopped programming C primarily, namespace confusion hasn't been a huge problem. This fetch() business, however, is absolutely a massive namespace confusion, and we should stop it. Please. I'm begging you.

Top comments (0)