paint-brush
Short Circuit Evaluation: What You Need to Knowby@amrdeveloper
132 reads

Short Circuit Evaluation: What You Need to Know

by Amr Hesham3mFebruary 8th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In most programming languages, the process of evaluating the second argument depending on the first one is automatically handled for you. To take advantage of Short circuit evaluation, you need to think carefully about the order of your conditions. If you have a validation function that depends on more than one condition, for example, you check that a user password has a length of more than 8 characters and then match it with the Regex pattern, the performance of this validation function can be different.
featured image - Short Circuit Evaluation: What You Need to Know
Amr Hesham HackerNoon profile picture
Amr Hesham

Amr Hesham

@amrdeveloper

Software Engineer interested in Android Development and Programming language design

Learn More
LEARN MORE ABOUT @AMRDEVELOPER'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Amr Hesham HackerNoon profile picture
Amr Hesham@amrdeveloper
Software Engineer interested in Android Development and Programming language design

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Buzzsumo
Unni
Coffee-web