r/Compilers • u/Dom-Klyn • Jul 03 '26
Looking for developers to give me constructive feedback on a new programming language.
Hi,
I’m currently working on a new programming language called Klyn.
I know some people will probably say: “Why yet another programming language?” And maybe they have a point. But from another perspective, why not be bold and try to offer a different take?
Anyway, my starting point is this: Python offers a clean and readable syntax, but when it comes to execution performance, it is not always ideal. So I started wondering: why not bring some of the good ideas from C++ into a Python-like language, especially for performance? And while we’re at it, Java and C# also have some interesting ideas worth borrowing. I also wanted to experiment with a few personal ideas, especially around collection syntax.
That is how I started building Klyn: a Python-like language focused on performance.
At this stage, Klyn currently offers:
- a readable and pleasant syntax, close to Python;
- static typing for more reliable code;
- implicit native compilation for performance;
- C#-inspired properties;
- several personal ideas around syntax and libraries;
- an already fairly broad API covering collections, strings, files, terminal I/O, GUI, databases, threads, LLM APIs, and more.
Since I’m currently working alone on the project, I have made extensive use of AI. I prefer to be transparent about that; I’m on the Codex side. Honestly, I don’t regret it. Still, the project is not production-ready yet, and that is exactly why I’m looking for feedback before moving toward that future stage.
So I’d really appreciate your impressions. And if you find the general approach interesting, what else would you expect from such a project?
Project website: https://klyn.deepcodia.fr
Tutorial: https://klyn.deepcodia.fr/docs/tutorial/index.html
API reference: https://klyn.deepcodia.fr/docs/api/index.html
I’m looking for technical feedback, constructive criticism, and suggestions for improvement.
Thanks in advance for your thoughts.
PS: I know there are already many great and performant languages out there, such as Rust, Go, and others, but I really want to give this idea a chance. So please don’t crush my hopes too much ;-)
11
u/Technical-Fruit-2482 Jul 03 '26
I don't think people in compiler or programming language subreddits will think to themselves "why another language"…
4
u/EggplantExtra4946 Jul 03 '26
Dude, there are many imperative statically typed natively compiled languages other than Go and Rust: Zig, Odin, C3, Hare, Beef, Nim, Nature, Jai in less than a year or two, and likely dozens more at least.
You can make a good language alone. A language with a clean base and a few good features that are lacking in other languages is sufficent for some people to adopt it, but nobody is going to use a LLM generated language and LLM generated libraries.
6
u/x2t8 Jul 03 '26
I couldn't find an open-source repo anywhere for this project, so I downloaded the win64 release and unzipped it to look at what's actually inside (samples, docs, link flags, bundled benchmark report) without running the binary. That raised more questions than the post answered, on top of the ones the pitch itself leaves open.
Not trying to dismiss the effort - the docs read as feature-complete on paper - but right now the writeup is almost entirely "what Klyn has" and almost nothing on "why it's designed this way" or "how it's implemented," and without a public repo there's no way to independently verify any of the performance or reliability claims above.
1
u/Mean-Decision-3502 Jul 03 '26
Your language and your goals are very similar to mine with my DQ language. Unfortunately because of the missing documentation I don't want to publish the project link yet. But If you wan't to have a early view, I can send you the repo link.
DQ is leaning a lot to modern Pascal too (that has also properties).
Why did'nt you keep the official Python type notation with the ":", which is used in many other languages too?
1
u/Lucky-Acadia-4828 Jul 03 '26
Where can I see the source code?
1
u/vmcrash Jul 03 '26
First, I appreciate that the website can be used for 95% of its functionality.
1
u/vmcrash Jul 03 '26 edited Jul 03 '26
I wonder whether an
ifwould need the colon. Maybe you can achieve it like Go - if the expression is not at the end, it will proceed on the next line, otherwise it is finished. The indentation should clearly indicate the if or else branches.Type definition: I would prefer something like
Null usage: please make the type system null-aware:
Good, that
assertis a keyboard.Good, that you have string interpolation. The syntax is also reasonable and reminds me on Lisette. It's unclear, though, whether full expressions are supported.
I would not declare
**as operator - IMHO power is too seldom used to be part of the language.Operator overloading I would consider overkill.
The
elifkeyword is IMHO redundant.Good, that
matchdoes not requirebreak.Regex matching I would consider overkill.
Range loops: how to change the stepping or perform a reverse iteration?
I don't see the reason for
passas keyword. If one actually needs that, create an empty fake function without parameter.Types in function argument declaration looks too verbose to me. Better consider to make providing the name required (optional, off by default).
I clearly miss the return type definition of the function.
Your collections I would consider overkill. I'd support fixed-size arrays and handle the collections themself as classes.
Tuples: multiple return values should use tuples.
Classes: I hope, the leading underscore for (private) members is not required. Otherwise the class definition looks reasonable.
I miss how the memory is managed. IMHO we don't need an additional language with manual managed memory - there are already too many unsafe languages. However some clever approach like Hylo (or with GC for other cases) would be cool and IMHO much more interesting and useful than
**,elif,passor regex matching.PS: You need to fix the syntax coloring in the documentation.
1
u/Pavickling Jul 03 '26
Your comparison with other languages implies C++ does a better job at "Performance is a central goal of Klyn". So, you should make it very clear in which aspects Klyn is already better than (and will continue to be) C++.
0
u/Actual-Ladder6631 Jul 03 '26
After a first glance, the variable definition syntax seems weird. putting the type after the variable name while using a special keyword seems a little too much. I would prefer having the classic variable definition: ```type name = value```, but it's your syntax so if you like it it's fine. I don't really like the indentation instead of curly braces, I think in big codebases it gets very messy which is why I don't really use python that much. I like the for loop syntax being simpler than c or c++, but I do think it's better to put the statements in braces for clarity. About classes most of it is good, but I do think's it shouldn't be necessary to add the `property` keyword when adding a property to a class, it should automatically make the variable a member of the class once it sees it's in the class' scope. For function everything is good aside from setting the return value, using the same syntax as the variable (`as type`) makes it seem you set the function to be that type instead of returning that type. I suggest maybe using a different keyword (maybe `returns`, for example:
), it's what I use for my language and I think it's much cleaner.
0
u/[deleted] Jul 03 '26
[deleted] — view deleted comment