Sjmarf@sh.itjust.works to Programmer Humor@programming.dev · 1 年前Unused variablessh.itjust.worksimagemessage-square49linkfedilinkarrow-up1907arrow-down119
arrow-up1888arrow-down1imageUnused variablessh.itjust.worksSjmarf@sh.itjust.works to Programmer Humor@programming.dev · 1 年前message-square49linkfedilink
minus-squareShouldIHaveFun@sh.itjust.workslinkfedilinkarrow-up2·1 年前I do actually use variables before I declare them most of the time. IDEs make it so easy to then generate the declaration with the correct type.
minus-squareNightAuthor@lemmy.worldlinkfedilinkEnglisharrow-up1·1 年前That’s true, in fact I’ve started doing that myself. Same with methods, instead of going and writing the method and then coming back to use it, I’ll write the invocation first.
I do actually use variables before I declare them most of the time. IDEs make it so easy to then generate the declaration with the correct type.
That’s true, in fact I’ve started doing that myself. Same with methods, instead of going and writing the method and then coming back to use it, I’ll write the invocation first.