By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,567 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,567 IT Pros & Developers. It's quick & easy.

What's the opposite of "forget"?

P: n/a
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_scroll ing which is nice,
but somehow...

PPS: Maybe remember_the_scrolling, also from WordNet, could work.
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Kai Grossjohann hu kiteb:
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?


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
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #2

P: n/a
Fabian wrote:
I wonder... does a function name have to be ascii, or can you use
chinese characters? From JavaScript 1.5 on, JavaScript identifiers may contain Unicode

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

http://devedge.netscape.com/library/...t.html#1008330
http://devedge.netscape.com/library/...t.html#1009568
http://www.unicode.org/
PointedEars
Jul 20 '05 #3

P: n/a
"Fabian" <la****@hotmail.com> wrote in message news:<br*************@ID-174912.news.uni-berlin.de>...
Does it really matter?
Oh, yes!
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 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.
I wonder... does a function name have to be ascii, or can you use
chinese characters?


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
Jul 20 '05 #4

P: n/a
Kai Grossjohann hu kiteb:
"Fabian" <la****@hotmail.com> wrote in message
news:<br*************@ID-174912.news.uni-berlin.de>...
Does it really matter?


Oh, yes!
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 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.


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
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #5

P: n/a
"Fabian" <la****@hotmail.com> writes:
Have you considered naming them according to the conventions of the
human language you are most familiar with?


Heh. Nah :-) I hate German identifiers. Too long.

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

Kai

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.