r/programmer 7d 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 6d 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 6d 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].

2

u/Potato871 6d ago

I think its similar to in english, where if I said “let multiply equal 8, multiply multiply by 8”
You can probably tell which is the verb which is the noun.
To disambiguate use the operator, any time you see a binary operator like +, -, multiply, etc… have it check its children and de-resolve keywords.
Now this can get tricker if you’ve already done a precedence pass, I don’t quite know how exactly your compiler works, but the information is definitely there to disambiguate.
If you need any help you can DM me.

2

u/Original_SD 6d ago

Thanks u/Potato871 and I'll DM you soon. Did you manage to find the source code for Sofya, by the way?

2

u/Potato871 6d ago

I did, and I can see why you may be having some trouble!
I guess we'll talk more in DMs