What's the opposite of "forget"?

Discussion in 'Javascript' started by Kai Grossjohann, Dec 8, 2003.

  1. On unload of a page, I store the current scrollbar position (ie,
    window.pageXOffset and window.pageYOffset) into a cookie. On load of
    that same page, I fetch the information from that cookie and scroll
    the window accordingly.

    I used the name "remember_scrolling" for the function doing the store,
    and "recall_scrolling" for the function doing the fetch. (There is
    also a function which deletes the cookie. It is named
    "forget_scrolling".)

    But I'm afraid that this might be wrong English, for "remember"
    appears to cover both storing and fetching. (I guess that "recall"
    and "forget" are suitably specific.)

    The obvious "{store,fetch,delete}_scrolling" and
    "{set,get,unset}_scrolling" are so, well, *obvious* and *boring*!

    Any ideas?

    Kai

    PS: www.dict.org tells me that WordNet suggests
    keep_in_mind_for_consideration_or_attention_scrolling which is nice,
    but somehow...

    PPS: Maybe remember_the_scrolling, also from WordNet, could work.
     
    Kai Grossjohann, Dec 8, 2003
    #1
    1. Advertisements

  2. Kai Grossjohann

    Fabian Guest

    Kai Grossjohann hu kiteb:
    Does it really matter? Javascript doesn't care what you name the
    functions (within certain restrictions), so as long as *you* know what
    the functions do, everything should be ok. Call them wasurete() and
    oboete() if you like.

    I wonder... does a function name have to be ascii, or can you use
    chinese characters?
     
    Fabian, Dec 8, 2003
    #2
    1. Advertisements

  3. characters and escape sequerences, including Chinese glyphs (AIUI
    Chinese has no characters):

    http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/ident.html#1008330
    http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/ident.html#1009568
    http://www.unicode.org/


    PointedEars
     
    Thomas 'PointedEars' Lahn, Dec 9, 2003
    #3
  4. Oh, yes!
    I don't (primarily) write programs for the computer to read. I write
    them for humans to read.

    Why?

    Because it's easy to make the computer understand, but it's not so
    easy for a human to understand. But to the poor soul who has to fix
    bugs in my code, it's vital to be able to understand what I did.

    So that's why I believe that choosing the right names is important.
    That would be quite useful -- Chinese is a quite succinct language,
    and having short identifiers in your code is a good thing.

    However, I don't want to require potential bug fixers to learn Chinese
    in addition to JavaScript ;-)

    Kai
     
    Kai Grossjohann, Dec 9, 2003
    #4
  5. Kai Grossjohann

    Fabian Guest

    Kai Grossjohann hu kiteb:
    Have you considered naming them according to the conventions of the
    human language you are most familiar with? There's less chance of making
    a mistake with language nuances that way. And no right-thinking person
    can reasonably object to things being named in the language of the
    author.

    Personally, I think well-written comments are far more important than
    the names of functions and variables.
     
    Fabian, Dec 9, 2003
    #5
  6. Heh. Nah :) I hate German identifiers. Too long.

    But some kind soul has suggested "memorize" which fits the bill quite
    well.

    Kai
     
    Kai Grossjohann, Dec 9, 2003
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.