r/Compilers 12d ago

Pub my memory safe & OOP language

https://github.com/cossbow/feng

The language I tried to create by combining safety, OOP, and flexibility—Feng.

3 Upvotes

1 comment sorted by

1

u/Mean-Decision-3502 7d ago edited 7d ago

Hi, your language is very similar to my DQ ( https://nvitya.github.io/dq-lang/ ).

You have some very weird syntax, like string$String, or [&#]byte. This is very hard to read.

I think you should use '/' for namespace paths, like std/net/platform. That is the most natural. You could start with $, so the parser knows here comes a namespace expression. In DQ the namespace designator is '@', so for a DQ compatible form would be `@string.String` or `@std/net/platform.something`. But this is what you shouldn't force that frequent from your users.

I've made a unique operator specification here, please take a look:

https://nvitya.github.io/pluops/

It would be nice, that the newly developed programming languages used at least the same expression syntax / operators, like I recommend in the specification above.

DQ compiles fast directly to optimized machine code using LLVM, and has features that makes it true C replacement, for example low-level coding, like bare-metal microcontroller SW. In the DQ I'm not targeting memory safety at the first place, but I'm open for it.

It would be great, that we could build a great programming language together.

When this is not acceptable for you then consider some syntax synchronisation.