geany/geany — comment on commit f31a84869d45980a7ecb27f5a4d6c3588c547eee
File: src/document.c line 2372
By ntrel:

There is more visual noise, so obviously it is harder to read. The more brackets and junk in the code, the harder it is to spot bugs. It is premature optimization, which is said to be the root of all evil.

> "if this happens, something is wrong"

G_UNLIKELY does not mean that. It means it may well happen, just that it is less likely than not happening. It is for optimization /only/. If it shouldn't happen then it should be an assert/return_if_fail.

I would like to remove all uses of G_[UN]LIKELY unless they are in a tight loop, which I doubt.