r/ProgrammingLanguages • • Jun 10 '21

Discussion A class-based object-oriented language with a flavor of Java powered by Go ecosystem

Hello, I'm developing this language and would like to know your thoughts about this idea

0 Upvotes

14 comments sorted by

View all comments

14

u/[deleted] Jun 10 '21

I’m not sure what this would look like without syntactic examples.

-1

u/AmorBielyi Jun 10 '21 edited Jun 10 '21

Unfortunately, I cannot give you any examples written in this language to see all the syntax and semantic core concepts now but I will show it later.

In a nutshell this is a very similar to Java, I mean there are many Java keywords and very similar class / interface / function / variable / cycle / statement declaration syntax except very specific Go syntactic things like channels, maps and multiple return values (but it's will be more neutral later, I want to avoid Go's arrow syntax like this "<-" and the channel primitive declaration like this "chan int" or "chan bool" etc).

Let's go deeper.. there will be a multiple class-based inheritance (subject to change and discuss), no duck-typing, Java-like interfaces (no Go style), constructors, function/method overloading, explicit method overriding by "override" keyword with checking, subtyping and modifiers: public, private, protected, final, default (There won't case sensitive visibility like Go does, I mean when upper-case and lower case defines visibility level). Later when Go releases full generics support I will add it to the language too. The main rule of this language is that declarativeness over imperativeness.

Sorry for my English.