Re: make == as = ? - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: make == as = ?
Date
Msg-id Pine.LNX.4.58.0404071116560.9008@sablons.cri.ensmp.fr
Whole thread Raw
In response to Re: make == as = ?  (Dennis Bjorklund <db@zigo.dhs.org>)
Responses Re: make == as = ?  (Dennis Bjorklund <db@zigo.dhs.org>)
Re: make == as = ?  (Martin Marques <martin@bugs.unl.edu.ar>)
List 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 by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: make == as = ?
Next
From: Dennis Bjorklund
Date:
Subject: Re: make == as = ?