sniffnoy: (Default)
[personal profile] sniffnoy
<< has a lower precedence than + ?! Whose idiotic idea was that?!

On a less irritating note, another word that ought to exist:

ex•ply \ eks'plı̄ \ vt explied; explied; explying; explies [ By analogy with "imply" ] : To make explicit. ⟨I know it what obvious, but I wanted to ~ it so it could be official.⟩

In order to feed the hysterical porpoises, the credit for this one goes to Nick. Don't ask why.

Date: 2003-06-28 09:15 am (UTC)
From: [identity profile] sniffnoy.livejournal.com
Well, that's just in C++. I don't think operator overloading does allow you to change the precedence, but I don't really know C++, only C, but from what I remember of operator overloading there's no way to specify a new precedence (how would that work, anyway?) so presumably the precedence of these things is constant.

Anyway that's just in C++, which keeps the same precedences from C. So that still leaves the question of why shifting has a lower precedence than addition in C.

(I suppose it's because | already had lower precedence than << and >>, and they figured that would be more common in that context, and that if you used + with shifting, you probably wanted to... eh, who cares.)

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031
Page generated Jan. 14th, 2026 09:04 am
Powered by Dreamwidth Studios