Re: Strange behavior of "=" as assignment operator
От | Chris Travers |
---|---|
Тема | Re: Strange behavior of "=" as assignment operator |
Дата | |
Msg-id | CAKt_ZftJzWj-FqE6DKrdkor4F+Pg2L32P9NLHf7w1swakYGymg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Strange behavior of "=" as assignment operator (David Johnston <polobo@yahoo.com>) |
Ответы |
Re: Strange behavior of "=" as assignment operator
|
Список | pgsql-general |
On Sat, Jun 1, 2013 at 2:52 AM, David Johnston <polobo@yahoo.com> wrote:
Chris Travers-5 wrote> However = as assignment is particularly odd to me for two reasons. First
> it is not ambiguous but it leads to difficult to read constructs, like
> this:
>> out_var = in_left = in_right;Agreed but the genie is already out of the bottle and I am OK with something
at the "lint/check_function" level trying to enforce good coding habits as
opposed to changing the language to prohibit what has now been allowed for
many years.
My preference would be that at some point we start adding warnings when = is used as an assignment. Such warnings could be turned off. Then at some later point we can decide whether to change the behavior. A decision to changing the language would be different if such behavior had given warnings for several years prior.
Best Wishes,
Chris Travers
В списке pgsql-general по дате отправления: