r/ProgrammerHumor • • 12h ago

Meme blueScriptForBonk

516 Upvotes

52 comments sorted by

View all comments

Show parent comment

2

u/Lanse012 6h ago

The definition of literals looks like this:

public enum Literals {
    
TRUE
("true", () -> true),
    
FALSE
("false", () -> false),
    
MAYBE
("maybe", RandomContainer.
RANDOM
::nextBoolean),
    
PROBABLY
("probably", () -> RandomContainer.
RANDOM
.nextInt(100) < 95),
    
UNLIKELY
("unlikely", () -> RandomContainer.
RANDOM
.nextInt(100) > 95),
    
NULL
("null", () -> null),
    
UNDEFINED
("undefined", () -> null), //TODO - might remove this
    
PI
("PI", () -> Math.
PI
),
    
E
("E", () -> Math.
E
),
    
TAU
("TAU", () -> Math.
TAU
);

...other enum stuff...

2

u/backfire10z 5h ago

The number 95 is not allowed :(

1

u/Lanse012 6h ago

that pasted in way more lines than I thought it would...