PPlamenu
HomeTrendingLive feedsPeopleGroupsRulesStaff
Sign in
PPlamenu
HomeTrendingLive feedsPeopleGroupsRulesStaff
Sign in

posted in Technology

lemmydividebyzero@lemmydividebyzero@reddthat.com
⁨20⁩d

Name before type: why 'age int' is better than 'int age'

benhoyt.com/writings/name-before-type/
benhoyt.comName before type: why 'age int' is better than 'int age'A variable's name is more important than its type, so the name should be more prominent and come first in declarations.
101035
Open original page
BoostsQuotesFavs
∟⊔⊤∦∣≶@luthis@lemmy.nz
⁨20⁩d

Replying to @⁨lemmydividebyzero@reddthat.com⁩

Hard disagree. Is that a joke? Type is far More important than name. Just ask the compiler.

7000
Open original page
BoostsQuotesFavs
Joelk111@Joelk111@lemmy.world
⁨20⁩d

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…

4000
Open original page
BoostsQuotesFavs
it_depends_man@it_depends_man@lemmy.world
⁨20⁩d

Replying to @⁨Joelk111@lemmy.world⁩

I only use python and I don’t understand why someone might think that. The order in python’s type hints is wrong too.

⁨Jul⁩ ⁨26⁩, ⁨2026⁩, ⁨08:36⁩en
0000
Open original page
BoostsQuotesFavs