Re: make == as = ?

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: make == as = ?
Дата
Msg-id Pine.LNX.4.58.0404071116560.9008@sablons.cri.ensmp.fr
обсуждение исходный текст
Ответ на Re: make == as = ?  (Dennis Bjorklund <db@zigo.dhs.org>)
Ответы Re: make == as = ?  (Dennis Bjorklund <db@zigo.dhs.org>)
Re: make == as = ?  (Martin Marques <martin@bugs.unl.edu.ar>)
Список pgsql-hackers
> > > =? as != is a synonum for <>, it would make sense.
> >
> > That was never such a terribly good idea, IMHO.
>
> Agreed. Compilers should give errors and not try to work around bad code.

Is it bad code? Not for people who come from a C/C++/Java background.
They are used to operators such as == !=  % && || !... Some of these
are available from pg, some are not, so at the time it is incoherent.

Also, I would not like == to mean anything but =, as any other meaning
would be quite error prone to users with a C background.

PostgreSQL is really extensible wrt operators, and I'm not that sure
it is so bad an idea to support "C" flavor operators.

> It would be useful with some flag/variable to set that makes pg generate
> varnings for non standard constructs. Unfortunatly there are so many
> things that are non standard, still using != instead of <> could be a
> usable warning.

You can have two policy. Either you're cool and homogeneous, or either
you're strict. At the time, postgreSQL is rather cool in some place:
!= and <>, ~~ and LIKE... and a little bit inhomogeneous.

-- 
Fabien.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dennis Bjorklund
Дата:
Сообщение: Re: make == as = ?
Следующее
От: Dennis Bjorklund
Дата:
Сообщение: Re: make == as = ?