While reading a book about Programming Languages, I saw the following highlighted paragraph:

Default values, optional segments, and catchall segments all increase the range of URLs that a route will match. Constraints have the opposite effect and restrict matches. This can be useful if an endpoint can deal only with specific segment contents or if you want to differentiate matching closely related URLs for different endpoints. Constraints are applied by a colon (the : character) and a constraint type after a segment variable name

So I got a little confused when facing the highlighted part above and want to know whether that part is able to be rewritten as follow:

to differentiate in matching closely related URLs

Otherwise, could any one explain the role of words came in the highlighted part above?(for example the word matching is an adjective and ...)

  • You should indicate what you already know before asking other people what they know. (Do you know that "to differentiate" is a verb, for example?) Doing so will help you to get better answers. Commented Jan 27, 2023 at 3:03
  • 1
    The (optional) preposition before a plural object in your context is between, not in. I would expect most dictionaries to give example usages showing that. Commented Jan 27, 2023 at 11:42
  • matching is an adjective, part of the phrase matching [closely related] URLs
    – Colin Fine
    Commented Jan 27, 2023 at 23:52

2 Answers 2


In my opinion the original phrasing is a bit clunky. A simpler sentence with the same grammatical essentials:

  • It is easy to differentiate pronouncing their names.

This could be a loose way of saying "differentiate the pronunciations of their names", or "differentiate how their names are pronounced".

The passage

...or if you want to differentiate matching closely related URLs for different endpoints.

might be rewritten as "or if you want to differentiate how closely related URLs for different endpoints are handled when matching them".

  • Thanks, I think so! I have another question, what does the word "for" act in the section 'for different endpoints'? Are we allowed to replace it with the word "of"(I mean: URLs of different endpoints)? Commented Jan 29, 2023 at 1:00
  • 1
    If I understand the passage correctly: yes, "of" also works. They are URLs that belong to/are used to access different endpoints.
    – nschneid
    Commented Jan 29, 2023 at 3:19

"Differentiate" is a verb and this verb takes a direct object. There are two common constructions:

differentiate Dupont from Dupond... (direct object and "from" prepositional phrase)

differentiate the twins (plural direct object)

It would not be possible to replace that direct object with a PP headed by "in".

It would be possible to say

differentiate between the twins.

  • 1
    In both your "twins" example and OP's cited context, we could optionally introduce between between differentiate and the (plural) direct object. But not in. Commented Jan 27, 2023 at 11:39

You must log in to answer this question.

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