Re: Remove unnecessary else branch
От
Tom Lane
Тема
Re: Remove unnecessary else branch
Дата
Msg-id
3438915.1602602703@sss.pgh.pa.us
Ответ на
Re: Remove unnecessary else branch (Li Japin)
Список
Дерево обсуждения
Remove unnecessary else branch Li Japin <japinli@hotmail.com>
Re: Remove unnecessary else branch Heikki Linnakangas <hlinnaka@iki.fi>
Re: Remove unnecessary else branch Hamid Akhtar <hamid.akhtar@gmail.com>
Re: Remove unnecessary else branch Li Japin <japinli@hotmail.com>
Re: Remove unnecessary else branch Tom Lane <tgl@sss.pgh.pa.us>
Re: Remove unnecessary else branch Li Japin <japinli@hotmail.com>
Li Japin writes: > I agree with Heikki from the code execution point of view. > In code execution point of view they are same, however, the code is for user, i think the readability is also important. There is another consideration here, which is avoiding creating back-patching hazards from gratuitous cross-branch code differences. If you need to rewrite a chunk of logic anyway, then fixing small cosmetic issues in it is fine. Otherwise I think "leave well enough alone" is a good guiding principle. regards, tom lane
В списке pgsql-hackers по дате отправления