Booleans feel like they make sense for our data or state, but they make sense for our logic
This means using it inside a function as a conditional variable
easy to miss in if statement of the client code
Enum Data
Check authorization
the application logic meaning of the value cannot be inferred from the type.
Please Stop Using Booleans.
That boolean should probably be something else | nicole@web
One of the first types we learn about is the boolean.
It's pretty natural to use, because boolean logic underpins much of modern computing.
And yet, it's one of the types we should probably be using a lot less of.
In almost every single instance when you use a boolean, it should be something else.
https://ntietz.com/blog/that-boolean-should-probably-be-something-else/
Please Stop Using Booleans.
Should we be using booleans? Yes, but a lot less then you think...
Thank you Embrace for sponsoring! Check them out at: https://soydev.link/embrace
SOURCE
https://ntietz.com/blog/that-boolean-should-probably-be-something-else/
Want to sponsor a video? Learn more here: https://soydev.link/sponsor-me
Check out my Twitch, Twitter, Discord more at https://t3.gg
S/O Ph4se0n3 for the awesome edit 🙏
https://www.youtube.com/watch?v=xIRL3klHM9I


Seonglae Cho