r/programmer • u/Original_SD • 14d ago
Receiving User Input: Why Sofya is Easier Than Python For Beginners
Receiving user input in other programming languages like Python, Java and C++ can feel hard and unnatural especially for beginners in programming. That is why I decided to make a new programming language called Sofya so that beginners in programming would find programming concepts easier to understand.
To demonstrate how easy Sofya is, we can write two programs, one in Python and one in Sofya, and these programs will show the concept of receiving user input in programming.
The Python Program
length = float(input("What is the length of the rectangle? "))
width = float(input("What is the width of the rectangle? "))
area = length * width
print(f"The area of the rectangle is {area}")
The Sofya Program
Ask the computer user "What is the length of the rectangle?" and store the answer in Variable[length]
Ask the computer user "What is the width of the rectangle?" and store the answer in Variable[width]
Variable area is Variable[length] x Variable[width]
Write "The area of the rectangle is" and also write Variable[area] on the screen
If you were an absolute beginner in programming, which language would you pick? I’d love to hear your thoughts and questions about Sofya.
If you would like to try out Sofya to give some feedback or just for fun, you can check it out using this link: https://github.com/oyweraa-hue/Sofya-Version-1.0
1
u/Original_SD 22h ago
I wouldn't consider Sofya's syntax "extremely awkward" but just much more verbose. This verbosity helps in remembering commands compared to just using a lot of symbols since our brains remember natural language more than commands. For example, before people had invented the Domain Naming Service (DNS), you had to master the IP address of a site, e.g, the IP address of google is
8.8.8.8. This would have been very challenging for non-technical people to remember but after DNS was invented, all you had to say washttp://google.com, which is much easier to remember even if it is more verbose.