MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/rpfykg/friends_take_on_programming_a_gui_button/hq4wnxm/
r/badcode • u/JuanR4140 • Dec 27 '21
90 comments sorted by
View all comments
Show parent comment
16
maybe !inventory.Visible
30 u/JuanR4140 Dec 27 '21 Lua, by default, uses the "not" keyword instead of "!". 20 u/Waterprop Dec 27 '21 inventory.Visible ^= true:) 38 u/[deleted] Dec 27 '21 How very much less legible than negating the value instead. Legibility > terseness. 6 u/Waterprop Dec 27 '21 I know, people didn't get the joke of it being bad I suppose. 6 u/[deleted] Dec 27 '21 Oh your comment was a joke? Sorry I didn't catch it, mb 2 u/Arikaido777 Dec 27 '21 the /s is your friend. i see your smiley but 🙃 can also convey a joke/sarcasm/intentional bad take as well 5 u/Meqolo Dec 27 '21 This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to performinventory.Visible = inventory.Visible ^ truewhich would obviously not work 2 u/itsTyrion Dec 28 '21 Is that bugged for me or does it just say inventory.Visible = true?
30
Lua, by default, uses the "not" keyword instead of "!".
20
inventory.Visible ^= true
:)
38 u/[deleted] Dec 27 '21 How very much less legible than negating the value instead. Legibility > terseness. 6 u/Waterprop Dec 27 '21 I know, people didn't get the joke of it being bad I suppose. 6 u/[deleted] Dec 27 '21 Oh your comment was a joke? Sorry I didn't catch it, mb 2 u/Arikaido777 Dec 27 '21 the /s is your friend. i see your smiley but 🙃 can also convey a joke/sarcasm/intentional bad take as well 5 u/Meqolo Dec 27 '21 This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to performinventory.Visible = inventory.Visible ^ truewhich would obviously not work 2 u/itsTyrion Dec 28 '21 Is that bugged for me or does it just say inventory.Visible = true?
38
How very much less legible than negating the value instead. Legibility > terseness.
6 u/Waterprop Dec 27 '21 I know, people didn't get the joke of it being bad I suppose. 6 u/[deleted] Dec 27 '21 Oh your comment was a joke? Sorry I didn't catch it, mb 2 u/Arikaido777 Dec 27 '21 the /s is your friend. i see your smiley but 🙃 can also convey a joke/sarcasm/intentional bad take as well
6
I know, people didn't get the joke of it being bad I suppose.
6 u/[deleted] Dec 27 '21 Oh your comment was a joke? Sorry I didn't catch it, mb 2 u/Arikaido777 Dec 27 '21 the /s is your friend. i see your smiley but 🙃 can also convey a joke/sarcasm/intentional bad take as well
Oh your comment was a joke? Sorry I didn't catch it, mb
2
the /s is your friend. i see your smiley but 🙃 can also convey a joke/sarcasm/intentional bad take as well
5
This is Lua, specifically Luau; this code wouldn’t invert the boolean but instead would try to perform
inventory.Visible = inventory.Visible ^ true
which would obviously not work
Is that bugged for me or does it just say inventory.Visible = true?
inventory.Visible = true
View all comments
Show parent comment
16
u/[deleted] Dec 27 '21
maybe !inventory.Visible