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
Hard disagree. Is that a joke? Type is far More important than name. Just ask the compiler.
Type is more important? So if the first argument of a function is minAge, which is an int, the important part is that it is an int? Just feed it any int?
No, the important part is the meaning, what the variable actually is, if you use a compiled language the compiler will handle types for you anyway. You’ll get a error if you feed it a string, or an water heater object, no surprises.
Leave the machine work to the machine (compiler in this case), and concentrate on the real work, which is the meaning here.