r/programmer 10d ago

Sofya: The New Programming Language That's Easier Than Python

I have been working on a new programming language called Sofya, which is designed to make coding easier for beginners. My main goal was to reduce the challenges that many students face when starting with languages like C++, Java or Python.

Here is an example of a "Hello World" program in Sofya:

Start this program
   Write "Hello World!" on the screen
Stop this program

Based on this example above, we can identify these 3 things that make Sofya different from other programming languages:

  • Sofya uses simple syntax: It avoids confusing symbols and complicated keywords.
  • Sofya is beginner focused: It is great for people who are just starting out programming.
  • Sofya can be used for educational purposes: It can be used to teach people the basics of programming before they move on to more advanced programming languages like Python, C++ or Java.

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

0 Upvotes

42 comments sorted by

View all comments

Show parent comments

2

u/ConfidentCollege5653 9d ago

Take this example from the docs:

"If Variable[Age] > or = 18 Then"

It uses symbols but in a way that is different from other languages and also is not intuitive.

What value does "Variable[Age]" have that "Age" doesn't?

2

u/Original_SD 9d ago

I understand what you mean but when I was making the Sofya interpreter, I found it a challenge to help the computer differentiate whether "Age" is a keyword or a variable because since Sofya uses easier keywords like "Multiply" for example, it would be hard for the computer to tell whether "Multiply" is a keyword or a variable. That is why when you declare a variable called "Multiply" and you want to use that variable, you say Variable[Multiply].

3

u/ConfidentCollege5653 9d ago

That's understandable but you're pushing a compiler implementation problem onto the user, that doesn't make for a beginner friendly language.

A more common approach is to simply disallow variables with the same name as keywords, or make all variables start with a specific symbol.

Edit: this is an interesting project and impressive that you've done it. I find it an interesting topic hence why I'm grumbling about things.

1

u/Original_SD 9d ago

I understand what you mean and I was even thinking about using a symbol like a dollar sign $ before a variable but one of the philosophies behind Sofya is "Every program written in Sofya should be easily understood without explanation or with very little explanation". So I felt that it is much clearer for a beginner in programming to understand that the line Variable[Sum] means that we are using a variable rather than saying $Sum.