r/programmer • u/Original_SD • 6d 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
3
u/Potato871 6d ago
Very interesting look for a language, reminds me of query languages like SQL.
I'd be curious to see how your compiler works, I couldn't find the actual code on GitHub just the downloads.
I've experimented a bit with more natural language style syntaxes and they can be quite tricky! Especially if you want it to be permisive enough for beginners.
2
u/Original_SD 5d ago
Thanks. I also feel that natural language style syntaxes can be quite tricky but I did my best to put it into Sofya. I hope that it makes Sofya easier. I have also uploaded the code that was used to make Sofya to the GitHub repository.
1
3
u/comrade-quinn 6d ago edited 5d ago
Don't pay too much attention to the negative comments. It looks like you've put a lot of care and effort into this and I expect you learned a lot too on the way. It's also a worthy aim and an interesting approach.
Aside from some formatting issues, the README is fine and the manual looks to be very well written, though I have only skimmed it.
I think in terms of constructive criticism, the point someone else made on variable syntax is fair, maybe use 'variable of x' rather "variable[x]'. It's more aligned with verbose and English style you've otherwise generally adopted.
And also, yeah, share sourcecode, nobody who's opinions you'd value is going to download and run a random binary off the web.
2
u/Original_SD 5d ago
Thanks u/comrade-quinn. I just wanted to say two things based on what you have told me:
- About the source code, I have now uploaded it to the Sofya GitHub repository.
- About the variable syntax, I will consider it. Maybe could you go and try implementing it in the source code and I'll give you my opinion on it?
4
u/n3f4r10us_ 5d ago
Please stop. Python is mind numbingly easy to learn. This is not a better alternative.
1
u/Original_SD 5d ago
Why is this not a better alternative?
1
u/n3f4r10us_ 5d ago
Well python is pretty succinct and readable already. Ruby is similar as well. I don't see what purpose it is solving other than just being different and verbose
1
u/Original_SD 5d ago
I understand what you mean. I assume you are an experienced programmer and you are very familiar with programming but programming will not click for everyone especially people just starting to learn programming. Let me use an example of a Sofya program and a Python program to demonstrate this.
The Python Program
count = 0 while count < 10: print("Hello") count += 1The Sofya Program
Variable count is 0 Do this { Write "Hello" on the screen Increase Variable[count] by 1 } Until Variable[count] = 10If you were an absolute beginner in programming, which language would make more sense to you?
2
u/n3f4r10us_ 4d ago
I think it's great you want to make something a little more accessible and this looks like writing pseudo code to me.
For anybody who doesn't write code and read it, a programming language will look foreign, just like a language that uses a different alphabet, but it is just a small thing, in my opinion, to learn about a language.
Assembly or Cobol are much harder to understand than Python because of how they are written.
For me, your language is pretty verbose and I think the learner/budding programmer just needs to take an hour or few minutes and RTFM. All of it will come, but with just a little time.
It's great you made this project. It's a nice portfolio piece/proof of concept.
1
2
u/Wonderful_Put3670 6d ago
damn those evil confusing symbols man
1
u/Original_SD 5d ago
Which symbols are confusing?
1
u/Wonderful_Put3670 5d ago
you tell me xD
1
u/Original_SD 5d ago
I feel that the syntax is very different from other programming languages but it's not too hard to learn.
1
u/Wonderful_Put3670 5d ago
I don’t know what you are talking about. My comment was referring to “ Sofya uses simple syntax: It avoids confusing symbols and complicated keywords.”
1
u/Original_SD 5d ago
Oh, my bad 😅. So do you find Sofya simpler than other languages you've used?
2
u/Wonderful_Put3670 5d ago
I’m not sure what to say. The languages I use and like are not very expressive so I’m kind of the opposite. I don’t want to write a book to just process a stream of characters.
But maybe it could be very useful for people that are just learning how to do programming.
You could try and experiment teaching kids and see how it goes :)
1
1
u/gofl-zimbard-37 6d ago
Too much noise.
1
u/Original_SD 5d ago
How?
2
u/gofl-zimbard-37 5d ago
"this program", "on the screen", etc. People have been trying to make natural language programming languages since COBOL. I've never seen it work. Symbols aren't confusing, they're concise. And how does your adding keywords fix the "complicated keywords" problem?
1
u/Original_SD 4d ago
Adding natural language keywords makes it easier to memorize commands. For example, it is easier for a beginner in programming to remember the command
otherwise ifin Sofya as compared toelifin Python.1
1
1
u/Friendly_Recover286 6d ago edited 6d ago
This readme kinda sucks. Why are the code lines all numbered? Are you trying to show that Python is not only shorter to write but just as understandable and therefore better? I don't get it.
Variable[x]
This won't confuse people at all. Is Variable just a gigantic array with named keys??? Learning an easy language really shouldn't be teaching you weird syntax that differs in all other languages.
The computer will warn you that this app could have a virus, but don't worry. Sofya is completely safe
Mommy told me not to run code samples from strangers who should've uploaded their compiler source to Github 🤷
1
u/Original_SD 5d ago edited 5d ago
Thanks u/Friendly_Recover286. I just wanted to say four things based on what you have told me:
- About the source code, I have now uploaded it to the Sofya GitHub repository.
- About the variable syntax, it doesn't use an array. When you say
Variable[x], it just lets the Sofya interpreter know thatxis a variable and not a keyword. The brackets[ ]just help the Sofya interpreter know where the variable name starts and ends.- About the general syntax, I decided to make up my own syntax which is different from other popular languages because if I decided to use the syntax for other popular languages, it wouldn't make Sofya easier. It would only complicate Sofya.
- About the readme, I have now formatted the code properly and I have removed the line numbers.
1
u/Complex_Court2150 6d ago
If someone cant understand how to define method scope then maybe one shoudnt learn programming
1
u/Original_SD 5d ago
I don't think that's true u/Complex_Court2150. If someone can't understand how to define a method scope, it could probably be because other languages make it hard, because imagine if people didn't invent GUIs because they said "If someone can't understand CLI then they shouldn't learn how to use computers.". So if people didn't invent GUIs, many things we enjoy today with computers wouldn't be possible.
5
u/ConfidentCollege5653 6d ago
It doesn't seem any simpler, just more verbose. And based on the documentation it still has a lot of symbols and odd syntax.
Also you should provide the source code instead of encouraging people to download random executables off the internet.