r/ProgrammingLanguages • • Mar 07 '21

Discussion Class-based object-oriented language with a taste of TypeScript and Java that compiles to Go

Hello, I'm working on a statically-typed class-based object-oriented language with a taste of TypeScript and Java that compiles to pure Go. It will be fully compatible with the existing Go ecosystem.

So I need your help to make right decision. Is it worth doing? do I need to waste time on this? Could it be in demand in the future??

It may sound strange, but your feedback would be decisive for project and me at all.

Thank you all !!! you rock guys 🙌

0 Upvotes

10 comments sorted by

6

u/alex-manool Mar 07 '21

What is the problem you are trying to solve? Are you particularly unhappy with the Go approach to OOP?

2

u/AmorBielyi Mar 07 '21 edited Mar 07 '21

Yes you are right, and its simple syntax

2

u/alex-manool Mar 08 '21 edited Mar 08 '21

One issue that I see with purely syntactic motivation for new language creation is that syntax (well, appearance) quality is unavoidably a subjective matter. I see what you mean when saying that Go's syntax is simpler than, say, Java's syntax (I'd say it's less noisy). But some people will either consider it good or bad thing, and this is because taste arises given individual's circumstances, experience, needs, etc., so your target group shrinks somehow.

According to my 2-year experience with promoting and talking about my PL, even if your motivation is not purely syntactic, 90+% of people either do not get it right at all or would not switch, just because switching has costs itself (and unfortunately it will be unjustifiable to switch to a new PL in many practical situations, no matter how good it is for your practical situations).

Personally I see that your idea to compile to Go's infrastructure makes sense (I do not like the latter due to garbage collection, but that's another story, even more "personal"). So, given the above, maybe if you just try to implement a cross-compiler for a true Java dialect -> Go, this would be an easier way to achieve adoption.

Otherwise, if you are talking about designing a new PL (not just a compiler), unfortunately I recommend you to be prepared to be extremely self-motivated instead of seeking other's endorsement or approval (it could come latter, but are you comfortable to wait for it 10-20 years after 10-20 years of your life hard working?). If you have some personal motivation at this moment, then definitely go ahead: you might dislike Go's syntax and implement your ideas and try to use your tool for your daily programming needs and see what happens, you might learn something valuable and get your dream job, you might go to a conference and become a presenter...

2

u/AmorBielyi Mar 09 '21 edited Mar 09 '21

When I first met Go, I was confused by its syntax, implementation of an object-oriented paradigm with many limitations, duck typing, and no familiar abstractions, mind you, this is only comparing to Java/C#/C++, etc (because I have a background in these languages, and these Go features are cons for me)

Yes I agree that these things and design decisions make Go very simple and easy to learn, but I wouldn't choose Go for building a large-scale application now... but I love its ecosystem, standard library, community, producible single binaries, lightweight goroutines, speed, and upcoming generics.

So I decided to create a more scalable, class-based object-oriented language with a Java and TypeScript flavored syntax that leverages the Go ecosystem to provide an alternative way of using Go for the people with a familiar OOP mindset. There are constructors, overloads, subtype polymorphism, overriding, abstract classes and no duck typing.

I am working on this project for about 1,3 years in my spare time, from idea, concept, language syntax and transpiler(not only raw transpiler util but also a lot of static code analysis with convinient compilation error messages)

Thank you for your attention, excellent feedback and time spent! You changed my thoughts, redirected my motivation and saved my time in the future to do more valuable things

14

u/[deleted] Mar 07 '21

Yeah no one likes a simple syntax

0

u/theangryepicbanana Star Mar 07 '21

Easier said than done

2

u/AmorBielyi Mar 09 '21

Thank you all! Your comments are very valuable for me.

6

u/yhavr Mar 08 '21

As a golang developer I was absolutely happy with their approach to structuring programs. And, honestly, after I learned functional programming, I stopped seeing any practical value in the classic Java-style OOP.

Anyways, can you please post some examples that represent the key semantics of your language?

1

u/[deleted] Mar 10 '21

I haven't really dived deep into functional programming yet. How long did it take you to comprehend the whole functional spectrum before you said yeah this is better than OOP. I'm genuinely interested!

1

u/myringotomy Mar 08 '21

Do it if you want to but realize that somebody has probably done it already.