I don't like to discuss politics
I don't like discussing politics
do these both mean the same? is there any rule of grammar that makes one of these incorrect?
Both of these are acceptable and have the same meaning:
I don't like to discuss politics
'like' followed by to-infinitive of verb 'discuss'
I don't like discussing politics
'like' followed by gerund of verb 'discuss'
If after the word "like" we use the verb with "ing", then we are talking about the activity we like to do - it gives us pleasure. On the other hand, if we use the infinitive after "like", then we are talking about an activity that we are used to doing, but it does not have to give us pleasure.
Both are perfectly fine. They mean the same. The to-infinitive or the -ing form can be used after the verb 'like'.
I like to watch TV= I like watching TV= I enjoy watching TV.
In British English there is sometimes a difference between 'like doing' and 'like to do'. I like doing something means I enjoy it. I like swimming (= I enjoy swimming)
'like to do something' means it is a good idea rather than a pleasure. I like to clean the room. (This does not mean that I enjoy cleaning the room)
We can use either a to-infinitive form or an -ing form after like, prefer, love and hate.
They have the same meaning, and neither is more correct than the other.
It is a standard way of varying writing style.