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.
Replying to @luthis@lemmy.nz
Maybe this comes from a non-typed language perspective… As someone who learned in Java, I do not like it because yeah, type is way more important. If someone was coming from Python, I can see why they might think this…
Replying to @Joelk111@lemmy.world
I learned Java first. I think type should come second as well, like in TypeScript et al.
If you’re ever looking for the variable manually for some reason, by searching with your eyes, it’s easier to find it by searching in the first character column.
Otherwise, if you ever need to see the type of something, which… should be obvious from the context in quality code, your LSP should just be able to tell you directly, by some mechanism (hover with mouse, or some keyboard action).