From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: make == as = ? |
Date: | 2004-04-10 12:33:24 |
Message-ID: | Pine.LNX.4.58.0404101424410.3177@mordor.coelho.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> But making == a synonym for = is just syntactic sugar,
Sure.
> of no obvious practical benefit that I can see.
I can see a small practical benefit, as I could skip the expression part
of my course just by telling them "same as java". No big deal, I agree.
> 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?
Maybe. The good news is that = is already used for assignment in SQL
(UPDATE foo SET bla=zzz), so it is already C-compatible;-) ;-)
> 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.
I'm not claiming that C choices were good.
> The last reason I advance against this is that operator space is scarce,
??? [!=<>+-*/%&~(at)]+ does not look scarce to me. Postgres has the largest
operator space I ever seen!
> and if we do use == somewhere it should be to some better purpose than
> this.
I'm not sure it would be good to have "==" meaning anything but "=", as a
lot of people are "used" to C/C++/java/perl.
Anyway, << bonnes Paques >>,
--
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2004-04-10 14:31:59 | Re: make == as = ? |
Previous Message | zhengjinyuan | 2004-04-10 11:29:56 | postgresql 7.4.2 on macosx 10.3 |