4

I just got a suggestion from Grammarly that I don't understand. This is my original sentence:

As a result, type MyEnum is composed of literal string types, which removes the need for import just for initialization.

By accepting the suggestion, I got:

As a result, type MyEnum is composed of literal string types, removing the need for import just for initialization.

I feel that the latter one is more readable. So I want to know what's the formal name of this structure. Thank you.

Please help me update the tag because I'm not sure about it.

1
  • I think they are roughly equally readable and Grammarly is not correct here. However, type MyEnum without an article reads strangely to me.
    – hunter
    Apr 3 at 18:56

2 Answers 2

10

Grammarly replaced a relative clause (the clause starting with "which") with a participle.

This is often possible. Both relative clauses and participles can be used as postmodifiers of nouns. But you sometimes have to be cautious. Consider these examples:

Joe ate the apple which was lying on the floor. It's clear that the apple was on the floor.

Joe ate the apple lying on the floor Perhaps it was Joe who was on the floor?

The ambiguity in the second sentence is a result of losing the verb "was".

2
  • 1
    Slightly non-serious aside, but with your examples, could Joe and the apple both be lying on the floor in both? As in if the apple is lying on the floor when Joe is eating it, it is very likely that Joe is having to be lying on the floor to get the apple in his mouth. (I am basically making a joke that neither example sentence unambiguously states that Joe removed the apple from the floor before eating it, even if that would be the implied sequence of events for a Human.)
    – Justinw
    Apr 3 at 12:15
  • Typo: Grammarly has replaced a relative… OR just Grammarly replaced a
    – Mari-Lou A
    Apr 3 at 19:42
5

This is a construction using a participle clause.

Participle clauses enable us to say information in a more economical way. They are formed using present participles (going, reading, seeing, walking, etc.), past participles (gone, read, seen, walked, etc.) or perfect participles (having gone, having read, having seen, having walked, etc.). We can use participle clauses when the participle and the verb in the main clause have the same subject. For example,

Waiting for Ellie, I made some tea. (While I was waiting for Ellie, I made some tea.)

The bomb exploded, destroying the building.

The OP's two examples mean the same, but the one deploying this type of construction is more economical.

You must log in to answer this question.

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