-1

Given these two sentences:

  • The mixin is a method of adding to the properties of a Javascript class.
  • The mixin is a method of removing from the properties of a Javascript class.

I'd like to combine them into a single sentence, but the verbs have different prepositions. So the use of two prepositions in the combined sentence feels clumsy:

  • The mixin is a method of adding to or removing from the properties of a Javascript class.

Is there a less clumsy way to phrase this? Possibly using a single preposition? I'm actually interested in the general case or a rule, not just this specific case with which I am dealing right now.

1
  • 1
    This use of the word "method" is likely to be confusing, since that term has a specific meaning in OOP.
    – alphabet
    Commented Feb 18, 2023 at 19:20

2 Answers 2

2

You don't really need the directional prepostions "to" and "from", you can use "of" in both the original and the combined sentences.

The mixin is a method of adding or removing properties of a Javascript class.

Or use the possessive form.

The mixin is a method of adding or removing a JavaScript class's properties.

4
  • Good. Also, "removing from the properties" was a bit off. Commented Feb 16, 2023 at 23:28
  • The mixin is a method of adding properties of a Javascript class. ← That doesn't make sense. Commented Feb 17, 2023 at 4:54
  • "mixin" is the name for a type of class that performs this operation.
    – Barmar
    Commented Feb 17, 2023 at 16:01
  • Yes, your second idea is often applicable to the general case. Thank you!
    – dotancohen
    Commented Feb 18, 2023 at 7:59
2

I suggest

The mixin is a method which modifies the properties of a Javascript class.

The suggestion is a verb, not a preposition, but is a less clumsy way to phrase it.

1
  • Thank you, but as stated I'm actually interested in the general case or a rule, not just this specific case.
    – dotancohen
    Commented Feb 18, 2023 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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