What is the difference between the following sentences? Are both correct? If both are correct, which is more popular?

The function imread reads images.

The imread function reads images.

Note that "imread" is the name of the function, and that the difference is the order of the words "function" and "imread". I have seen both constructions repetitively in software manuals and source code comments.

  • 2
    One question per post please. – Michael Rybkin Apr 4 '18 at 17:58
  • 4
    But conversely, when there is a name, it is common to precede the name by a classifier: "the book Paradise Lost, the film Aliens, the mountain Kilimanjaro". "The function imread" is a very common pattern in technical manuals. – Colin Fine Apr 4 '18 at 18:31
  • Please post your other question as a separate post. – snailplane Apr 4 '18 at 20:41
  • My comment above was a reply to a comment which has since been deleted. The upshot is that there is plenty of precedent for both ways round. – Colin Fine Apr 4 '18 at 23:05
  • Just to give you an example. The page contains both "the built-in function len()," and "the print() function." – x-yuri Aug 18 '20 at 19:02

I'm know quite a bit about coding and can confirm that both are correct.

Personally if I was going to talk about that function to other programmers then I would say "imread function" but, if I was going to create some documentation about it (this would be a more formal context) then I would put "function imread".

TLDR - Both are correct. If I had to, I'd say "function imread" is more formal but it really doesn't make much of a difference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.