Skip to main content

Bug Tracker

Side navigation

#7446 closed bug (wontfix)

Opened November 09, 2010 08:01AM UTC

Closed November 09, 2010 08:07AM UTC

Last modified August 15, 2012 08:48PM UTC

prepend and prependTo methods not accurate as method descriptors

Reported by: anonymous Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:
Description

"Prepend" isn't a word in any real dictionary, it is jargon.

Should consider using the proper term of 'prefix' and 'prefixTo'

This is confusing to people who don't know what prepend is, because it isn't a word in the english language.

http://www.merriam-webster.com/dictionary/prepend

Attachments (0)
Change History (9)

Changed November 09, 2010 08:07AM UTC by snover comment:1

resolution: → wontfix
status: newclosed

Ajax isn’t a “word in any real dictionary” either. Deal with it. prepend at dictionary.com

Changed November 09, 2010 08:29AM UTC by anonymous comment:2

Many programming style guides recommend that method names begin with a strong action verb. As prepend is in fact jargon, it is not a strong action verb that is easily understood. Even in this comment field the word is underlined by the browser because it does not recognize it as part of the English language.

The example given above that "Ajax isn't a 'word in any real dictionary' either" is not true, as ajax exists in nearly every English dictionary.

Its meaning is not the one usually referenced, however it is also not a method and therefor use of a strong action verb isn't recommended.

These tickets are here to make jquery a better product, not for facepalming. the bug should be valid regardless of snover's impudence and ignorance.

Changed November 09, 2010 08:11PM UTC by SlexAxton comment:3

_comment0: 1) It's not a bug. It'd be an enhancement, if it was anything. \ \ 2) It's a backwards incompatible api change - something _everyone_ loves. \ \ 3) 'ajax' is a function, though it's not a it a 'strong verb' or even a 'verb' for that matter in your definition. \ \ 4) In 2 years of jQuery support on the jQuery IRC, I have never once seen someone be confused by this function. \ \ 5) prefix would not be the correct word. It implies _before_ not 'add as the first element of' like prepend implies. \ \ 6) Regardless of the purpose of the bug tracker, you are not welcome to post insults to the people who triage the bugs here (or anyone for that matter). That's cowardly, uncalled for, and rude. Show some respect.1289334240908776

1) It's not a bug. It'd be an enhancement, if it was anything. (Which it isn't)

2) It's a backwards incompatible api change - something _everyone_ loves.

3) 'ajax' is a function, though it's not a it a 'strong verb' or even a 'verb' for that matter in your definition.

4) In 2 years of jQuery support on the jQuery IRC, I have never once seen someone be confused by this function.

5) prefix would not be the correct word. It implies _before_ not 'add as the first element of' like prepend implies.

6) Regardless of the purpose of the bug tracker, you are not welcome to post insults to the people who triage the bugs here (or anyone for that matter). That's cowardly, uncalled for, and rude. Show some respect.

Changed November 09, 2010 08:24PM UTC by paul.irish comment:4

7) is my favorite number.

Changed November 09, 2010 08:25PM UTC by ajpiano comment:5

_comment0: Just because something doesn't show up in Merriam Webster's unabridged dictionary does not mean it is "not a word." Prepend is a perfectly reasonable backformation from append, and has been in use in computing circles for some time. Outside of its meaning in a computing context, it is definitely a word, one that means "to consider, to ponder." \ \ Languages and APIs are full of terms that are borrowed from English and repurposed. "Explode" in PHP does not cause a string to detonate. "Grep" is not, in fact, a word. "Ajax" does not have a standard meaning in English except as a given name. \ \ The bug tracker is indeed for identifying problems and ideas that will make jQuery better. Making an API change that would either be backwards-incompatible or require legacy support to not break people's existing code because one anonymous user shows up and decides to play ticky-tack prescriptivist is not one such change. 1289336036719232

Just because something doesn't show up in Merriam Webster's abridged dictionary does not mean it is "not a word." Prepend is a perfectly reasonable backformation from append, and has been in use in computing circles for some time. Outside of its meaning in a computing context, it is definitely a word, one that means "to consider, to ponder."

Languages and APIs are full of terms that are borrowed from English and repurposed. "Explode" in PHP does not cause a string to detonate. "Grep" is not, in fact, a word. "Ajax" does not have a standard meaning in English except as a given name.

The bug tracker is indeed for identifying problems and ideas that will make jQuery better. Making an API change that would either be backwards-incompatible or require legacy support to not break people's existing code because one anonymous user shows up and decides to play ticky-tack prescriptivist is not one such change.

Changed November 11, 2010 12:29PM UTC by nocknock@verizon.net comment:6

Can't believe this showed up. Me and my buddy had a discussion about this maybe 3 years ago. In our own programming we use prefix. Once our boss used the word prepend to describe what to do and I responded "Shouldn't I first prepopulate the data?" Of course he said he wasn't sure.

Bottom line is we try not to use words imaginitized by others, like prepopulate (just use populate), its just good strategery. We don't want jargonized words snuck into our codebase.

I get why it's wrong to use prepend, but should it be changed? Probably not, but a good lesson may be to stick to common words that can be looked up in a standard dictionary and everyone knows (not just seasoned programmers) when defining methods. Also, stops all the squabbling.

Changed August 14, 2012 03:09PM UTC by gibson042 comment:7

#12297 is a duplicate of this ticket.

Changed August 14, 2012 05:06PM UTC by anonymous comment:8

The way to make it backwards compatible is

1) Copy it to a new method called prefix

2) Mark prepend as deprecated

3) Call prefix from prepend

Changed August 15, 2012 08:48PM UTC by anonymous comment:9

Surely when it would be changed to "prefix" people start complaining it is not consistent with "append".

That said, if you want it yourself just add these two little lines to your file:

$.fn.prefix = $.fn.prepend;
$.fn.prefixTo = $.fn.prependTo;

I don't think the advantages of changing it in core weigh up against the disadvantages.