posted in Technology
Name before type: why 'age int' is better than 'int age'
benhoyt.com/writings/name-before-type/posted in Technology
Name before type: why 'age int' is better than 'int age'
benhoyt.com/writings/name-before-type/Replying to @lemmydividebyzero@reddthat.com
This is just arguing about whether the surname goes before or after the given name.
If you think int x makes the most sense, you might be Chinese. Or Hungarian. Or English speaking if you grew up with characters like Fireman Sam or Postman Pat... erm...
Replying to @palordrolap@fedia.io
This is my take as well. I will add that I think I’m more likely to notice an issue with the type if the type is first though since it preps me to expect a certain thing after it.
int firstName will likely trigger more alarms than firstName int but maybe thats just my perception due to familiarity. I feel like once I see the type my mind is looking to make the next part make sense whereas if I see the name first then I just assume what comes next makes sense and mentally move on.