6

I usually have some doubts when I have to use prepositions, and one of my most frequent ones is when I should use “in” and when I should use “on”.

For example:

Returns true if the profile is found in the list, false otherwise.

Is it OK to say “in”, or should I use “on” there? Is there any strict rule about using “in” or “on”?

0

3 Answers 3

8

“In” implies boundaries in two or more directions. With a list, especially in coding, it’s entirely appropriate to say “in the list” in reference to something within the start and end boundaries of the list.

“On” suggests a floor of some kind, that is to say a surface that provides a lower boundary. With so many lists made on paper, it will not sound strange to say “on a list” because the list can be thought of as existing on a surface.

Summary: In this case, it’s up to you! The former seems more context-appropriate if you ask me, but neither should offend anybody. You’re either being more literal (“in”) or more figurative (“on”).

2
  • Thanks! The "dimensional" approach definitely makes sense.
    – jmm
    Nov 28, 2014 at 19:15
  • 1
    Good distinction. It's one thing to say "both are fine", but probably most native speakers actually use both in detectably different contexts. Not with absolute accuracy or consistency, but you're certainly more likely to be in a list that's not obviously bounded by a single surface that it's on (a sheet of paper, say). Nov 28, 2014 at 19:17
3

I was an English teacher for years, and in those days, the only preposition acceptable with "list" was "on." In fact, to write "in the list," was considered a mistake. It's obvious to me that the graphic idea that comes to mind when one talks about a list, is the flat surface of a piece of paper ON which the different items will be written. By definition, a "list" will never have the clearly defined boundaries of items for which we would unhesitatingly use the preposition IN, such as a box or a drawer.

It seems to me that in the current politically correct world, lots of people are bending over backwards in order no to have to tell those with a tenuous grasp of the English grammar that they are simply wrong. In

2
  • Did you intend on writing anything in the last line, because it seems pretty incomplete? In ... Nov 27, 2020 at 11:11
  • 1
    @Julian Welcome to ELL, Julian! A good answer. I rather agree with you. If you want to you can edit it to continue that vestigial last sentence. Were you going to say, "In my day..."? :-) Nov 27, 2020 at 11:33
1

I meant to comment on Julian's answer but do not have enough reputation.

I am a Chinese and English language is not my mother tongue so I am in no place of providing "answers" to a question like this. But would like to give my two pennies as an IT professional.

In almost all the programming languages today, there is a "list" data type, which may have an alternative name like an "array" or something else. List and array may co-exist in some languages as two different data types, which is beyond the discussions here.

"Lists" in a programming language now do have boundaries and they serve like containers with elements "in" them. Because of that I tend to use "in a list" in my everyday life outside of work and coding.

1
  • Are there contexts when "on" comes to mind by default? Feb 17, 2023 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .