22 ms·
My first programming teacher insisted we call the single = sign the 'gets' operator. So int x = 10 int y = x would read in English as x gets 10, y gets x. Sh
by DubiousPusher 9y ago
My first programming teacher insisted we call the single = sign the 'gets' operator. So
int x = 10
int y = x
would read in English as x gets 10, y gets x.
Shortly after that class I took a break from any coding. When I went to another school I saw Softmore and Junior level programmers still struggling with this. I retained the habit of using 'gets'and never had a problem with this.
- rocqua 9y agoI've heard the same but with 'becomes' rather than 'gets'. I think becomes works better for people with a mathematical background, where the concept of variables is totally natural. For people without this, 'gets' might be better because it helps anthropomorphize the variable. The coder 'gives' X a value to hold.
- Retra 9y agoPeople with a mathematical background should be thoroughly familiar with words having overloaded and jargoned up meanings. Fiber Bundle, group, set, relation, etc... They all mean something different when you're not talking about mathematics, and '=' is no different.
- DubiousPusher 9y agoIf you're speed reading some code 'becomes' is a bit of mouthful.
- rhaps0dy 9y agoDo you mouth the name of operators when you read code? Like most people I do make the words sound in my head when reading text but only the variable names make sounds when reading code.
- DubiousPusher 9y agoI'm a bit of a mutterer but it depends on my mood I think.
- stordoff 9y agoSomething I've noticed is that I don't tend to subvocalise when reading code, but if I do, I generally read "x = 10" as "x e. 10" rather than "x equals 10" (so basically just the first syllable). I will read "if x = 10" as "if x equals 10". Not sure why/how I picked it up, but similar principle, I suppose.