Is possible a language easy as py, fast as C, more secure than Rust?

3 days ago

With the AI being so powerful, we should have a better programming language. This language is named cpluz/cz, signifying that it is generally between C and C++, but with some differences. Because its philosophy is fundamentally different from C++, ours is "simple the best".

My initial plan is as follows:

A. Roadmap: Version 0.1 is a subset of C++23. The advantage is that it can coexist with the existing C++ ecosystem, all programs and libraries can be shared.

Version 1.0beta is a hardbreak. At this stage, tools or AI should be available to completely convert version 0.1 and C++23 code into CZ1.0 + independent compiler tools.

B. Language design: Currently considered: 1. No header; use modules; 2. C++20 + Multidimensional Subscript Operator/if consteval; 3. Use the C++23 library.

The overall goal is:

One-page cheat sheet (+half a page of basic ideas, if you have zero coding knowledge); 10 pages of a full book. This means roughly no more than 20 basic syntax rules. This will allow both AI and humans to easily learn and communicate with it, achieving ease use as Python. And put everything else in the library.

Based on C++, it should achieve similar speed, and even more efficient because it's simpler.

Besides the safety of Rust, we also need to add Trust, which means strict code review before sharing (including test code, which exploited by hackers of XZ).

Given the speed of AI development, a complete course should take about 18 months, which isn't an exaggeration?

I have my own programming language, which is safe (unless one uses unsafe code), fast (compiled into machine code and uses no GC) and easier than Rust (has no traits and generally less boilerplate). It's influenced by C++, but isn't designed to be as close to C++ as possible.

So, it's pretty doable to do what you wish to do. But it requires a lot of effort, I have spent almost 10 years developing it.

  • I think all programming languages are "safe (unless one uses unsafe code)", no?

    • The question is how to tell which code is unsafe. In some languages it is easier, in some languages it's much harder.

      For example in C and in C++, every line is potentially unsafe, so you have to verify the entire program very, very carefully.

      On the other hand Java is safe, unless you mess with JNI. This is a very infrequently used feature, so for most programs you can be 100% sure there are no certain class of safety issues.

      Rust has specific "unsafe" keyword - if you see it in a program, you have to be very careful. You can write quite a lot of Rust without ever using it.

    • All of them that I can think of are capable of producing safe(ish) programs. Mainly those where an empty file is a complete program.

1. You are mixing up the development process and the language. 2. C++ would be an horrible baseline for newcomers.

In my opinion Rust has at the moment an good chance to be an successor to c++. Traits and derive macros already reduce the boilerplate an dev has to do.

For example Debugging: - i want to export the default debugging information: #[derive(Debug)] - i have so items that should not be debugged: custom derive implementation for the type or the secret information

Surely the end goal should be for AI to produce executables without worrying about how it is achieved.

  • All the trends say this will be the case in a few years, but a lot of people like to pretend otherwise.

Is it compiled? As long as we're reinventing everything, why have files? "Just" glue the LLM to the execution engine and have it do stuff.