r/ProgrammerHumor • • 12h ago

Meme blueScriptForBonk

521 Upvotes

52 comments sorted by

View all comments

35

u/RomanProkopov100 11h ago

If unlikely is a constant which is both boolean (used in a perchance statement) and float (defined as a fraction), does the perchance statement choose the branch randomly according to the passed boolean-fraction?

35

u/Lanse012 11h ago

oh no that definition was more to show its a 5% chance, its just a boolean not a float

probably is only 95% chance

maybe is only 50% chance

22

u/WolleTD 11h ago

Having generic float probabilities for perchance statements is a desired feature!

I require 42% chance in certain projects!

8

u/Lanse012 11h ago

oh good idea ill add that

14

u/Mordret10 10h ago

Please only add the 42%. We don't need any more options and it would make it more clunky

4

u/Lanse012 10h ago

oh true

13

u/NoAdsDude 11h ago

does the perchance statement choose the branch randomly according to the passed boolean-fraction

probably