Hello, HN!
Today I want to show my project: a programming language named Ü.
For many years I has been using C++ for coding – both at my job and for hobby projects. C++ is mostly fine for me, since it delivers great performance and powerful abstractions. But C++ had and has many footguns, which make using it sometimes painful. So I thought a better programming language could exist, which can have many advantages of C++ without its downsides. Especially I wanted safety by-default, so that shooting the leg is hard, but without unnecessary overengineering. After a brief search I found no other language fully satisfying my requirements and thus I decided to create one myself.
Developing a new programming language wasn’t fast and easy, but after many years of development I have managed to do this and created a language, which satisfies my requirements. I think it’s now ready for a wide audience.
Ü is a general-purpose programming language designed to be safe and fast and it achieves these goals. Surprisingly achieving both doesn’t require insanely complex language design and compiler implementation. Static typing in combination with clever compile-time analysis and safe/unsafe code separation allow achieving safety. Compilation into machine code (with help of LLVM) provides enough speed. Also Ü just doesn’t do much in runtime which could slow-down its performance – most of the safety checks are done in compile-time and destructor-based memory and resources management requires no runtime penalty typical for languages with garbage collection.
Ü isn’t just a better C with a couple of bells and whistles. It’s pretty feature-reach, much like C++ is. These features include classes, inheritance, type and function templates, lambdas, coroutines, compile-time reflection and possibilities of compile-time code generation.
Ü uses curly braces-style syntax, but it doesn’t try to copy all syntax elements of some particular language. There are keywords and syntax elements borrowed from C++, Rust or whatever else. Despite this most syntax rules should be pretty familiar for users of mainstream programming languages.
I have developed and continue developing two compilers for Ü – one written in C++ and another one written in Ü itself (specifically frontends, both use LLVM backend written in C++). Besides that Ü has many other components like its own standard library, a build system, a language server, a tool for C headers conversion, etc.
I believe that the language is ready to be used for writing some real code. Having a self-hosted compiler and many other components written in it should prove this claim to be true. Ü maybe isn’t ready for very reliable industrial code doing serious stuff (like OS kernels or banking software), but it should be fine to use it for things like hobby projects.
See examples (https://github.com/Panzerschrek/U-00DC-Sprache/tree/master/s…) to get a general idea what Ü is and how it looks like and feels. Read the documentation (https://panzerschrek.github.io/U-00DC-Sprache-site/docs/en/c…) for more details. If you have some questions about the specific mechanism providing safety, read the corresponding chapter (https://panzerschrek.github.io/U-00DC-Sprache-site/docs/en/r…). If some topic isn’t clear for you after reading the documentation, contact me and I can answer your questions.
You may ask, why have I named my language Ü? The answer is simple: I wanted a single-letter name, but all regular Latin letters were already used (https://beza1e1.tuxen.de/one_letter_proglangs.html). So I chose a letter, which belongs to extended Latin alphabet and is pretty common in many natural languages (like German).
Comments URL: https://news.ycombinator.com/item?id=45769161
Points: 1
# Comments: 0
Source: github.com
 
								
