Re: make == as = ?

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: make == as = ?
Date: 2004-04-10 11:05:10
Message-ID: 4485.24.211.141.25.1081595110.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fabien COELHO said:
>
>
> So on the point that the standard must be supported, I perfectly agree.
>
> On the point that anything else should be dropped out: let's do it!
> I'll send a patch to remove all those non portable features in
> postgresql that make users write non portable code... But I'm not sure
> it will be accepted;-)
>
> Moreover, having == as a synonym for = is not necessarily in
> contradiction with a stable, reliable and predictable server.

Nobody is suggesting that we should not support legacy features that are
non-standard, nor even that we should not occasionally, and for very good
reasons, introduce new non-standard features (e.g. dollar quoting).

But making == a synonym for = is just syntactic sugar, of no obvious
practical benefit that I can see. I think its alleged utility in teaching
C/Java/perl programmers is overstated - if they think of == as equality
will they also think of = as assignment? And the fact that C (stupidly)
uses = for assignment is the whole reason for the existence of == in the
first place, and many languages (e.g. see the algol family) do not suffer
from this defect.

The last reason I advance against this is that operator space is scarce,
and if we do use == somewhere it should be to some better purpose than
this.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message zhengjinyuan 2004-04-10 11:29:56 postgresql 7.4.2 on macosx 10.3
Previous Message Fabien COELHO 2004-04-10 09:35:42 Re: make == as = ?