Re:A nice, little known C feature: Static array indices in p...
by einhverfr on Tuesday February 19, 2013 @01:49AM
(#5243028)
Interestingly PostgreSQL's pl/pgsql does that.
There are two operators, equality = and assignment :=
But where it is clear that assignment was meant, = is treated as assignment. this means you can:
a = 5; -- exactly equivalent to a := 5 here
if a = 6 then
raise exception 'this should never happen';
end if;
Interestingly this is entirely a Postgres-ism. Oracle's PL/SQL offers no such "feature."
= and == should have different meanings.
I also like how JavaScript has ===, although it is a little superfluous.