Re: make == as = ?
От | Fabien COELHO |
---|---|
Тема | Re: make == as = ? |
Дата | |
Msg-id | Pine.LNX.4.58.0404101424410.3177@mordor.coelho.net обсуждение исходный текст |
Ответ на | Re: make == as = ? ("Andrew Dunstan" <andrew@dunslane.net>) |
Список | 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, ??? [!=<>+-*/%&~@]+ 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@cri.ensmp.fr
В списке pgsql-hackers по дате отправления: