Cant I just have a loop called loop If you were designing yo
Can\'t I just have a loop called loop?
If you were designing your own programming language would you minimize the number of looping constructs or provide as many as you can think of? Explain your answer.
Solution
We can have a loop called loop. We create different number of loops as we define each loop differently, for different purpose. If I design my own programming language, I will neither create only one loop nor as many as I think. I will create a loop according to the requirement and usage.
Eg:
\"Do-while\" is used to execute the statements in the loop atleast once even if the condition fails
\"While\" statements can\'t be executed if the condition fails
\"For\" is a user-friendly loop and easy to use as we give the condition including initialization and increment in that loop.
So loop called loop can be created but it can\'t be used in common to all requirements.
But creating no of loops can be minimized.
