Imperative programming gives computers step-by-step instructions on how a task should be carried out. It’s like giving a home cook a recipe with detailed instructions and asking them to make a meal, following the steps by the letter.

Declarative programming allows users to declare what they want, and the computer figures out how to do it. Now we are ordering a meal from a restaurant. The chef can deliver a dish without a detailed recipe from the customer; they will likely do better than following the customer’s recipe step-by-step. This approach makes it easier for lower-level compilers and tools to evolve and optimise. For example, when you build your UI with decorative code in iOS or with React, your UI will likely function correctly and get the new features or look and feel automatically when there is a major iOS or React framework update.

Copilot. Moving on to the next level, AI models such as Copilot can write code based on your intent. The idea is that now you have a personal assistant who can order the best meals from the finest restaurants around the globe and bring the food to you whenever you are hungry. The assistant is also a nutrition expert, remembering all your diet records and preferences, and can guarantee a nutritious and delicious diet.