cm0002@lemmy.zip to Programmer Humor@programming.dev · 3 days agoMore code = more betterlemmy.zipimagemessage-square92linkfedilinkarrow-up1645arrow-down115
arrow-up1630arrow-down1imageMore code = more betterlemmy.zipcm0002@lemmy.zip to Programmer Humor@programming.dev · 3 days agomessage-square92linkfedilink
minus-squareOshaqHennessey@midwest.sociallinkfedilinkarrow-up2·3 days agoI just tested it in PowerShell. Works fine $i = 1 $x = -$i $x Outputs -1
minus-squaresquaresinger@lemmy.worldlinkfedilinkarrow-up2·2 days agoWorks fine in any language I ever used. I’m honestly quite surprised that this very basic language feature is even a matter of discussion here.
minus-squareSylvartas@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up2·1 day agoIt certainly makes me question a lot of things. This sub somehow manages to both feed my impostor syndrome and makong me feel like a genius programmer depending on the thread.
minus-squaresquaresinger@lemmy.worldlinkfedilinkarrow-up2·edit-21 day agoTotally, yes. I guess there’s a ton of non-programmers and total beginners in this community. But sometimes there are some crazy good programmers here as well. What’s really weird though is that I got two downvotes a bit further up for claiming that unary minus is a standard language feature.
minus-squareSylvartas@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up2·21 hours agoYeah I saw that. It’s weird because I’ve used it without a second thought in tons of different languages and never had issues with it
I just tested it in PowerShell. Works fine
$i = 1 $x = -$i $xOutputs -1
Works fine in any language I ever used.
I’m honestly quite surprised that this very basic language feature is even a matter of discussion here.
It certainly makes me question a lot of things. This sub somehow manages to both feed my impostor syndrome and makong me feel like a genius programmer depending on the thread.
Totally, yes. I guess there’s a ton of non-programmers and total beginners in this community.
But sometimes there are some crazy good programmers here as well.
What’s really weird though is that I got two downvotes a bit further up for claiming that unary minus is a standard language feature.
Yeah I saw that. It’s weird because I’ve used it without a second thought in tons of different languages and never had issues with it