是否有一种语言,像Python一样简单,像C一样快速,比Rust更安全?
随着人工智能的强大,我们应该有一种更好的编程语言。这种语言被命名为cpluz/cz,意味着它在C和C++之间,但有一些不同之处。因为它的哲学与C++根本不同,我们的理念是“简单就是最好”。
我的初步计划如下:
A. 路线图:版本0.1是C++23的一个子集。其优点在于可以与现有的C++生态系统共存,所有程序和库都可以共享。
版本1.0beta是一个重大变革。在这个阶段,应该有工具或人工智能可以将版本0.1和C++23的代码完全转换为CZ1.0及独立编译工具。
B. 语言设计:目前考虑的内容包括:1. 不使用头文件;使用模块;2. C++20 + 多维下标运算符/如果是consteval;3. 使用C++23库。
总体目标是:
一页速查表(加上半页基本理念,如果你没有任何编程知识);10页的完整书籍。这意味着大约不超过20条基本语法规则。这将使得人工智能和人类都能轻松学习和使用,从而实现像Python一样的易用性,并将其他所有内容放入库中。
基于C++,它应该实现类似的速度,甚至更高效,因为它更简单。
除了Rust的安全性外,我们还需要增加信任,这意味着在共享之前必须进行严格的代码审查(包括测试代码,这些代码可能被XZ的黑客利用)。
考虑到人工智能发展的速度,完整的课程大约需要18个月,这并不是夸张吗?
查看原文
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".<p>My initial plan is as follows:<p>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.<p>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.<p>B. Language design: Currently considered: 1. No header; use modules; 2. C++20 + Multidimensional Subscript Operator/if consteval; 3. Use the C++23 library.<p>The overall goal is:<p>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.<p>Based on C++, it should achieve similar speed, and even more efficient because it's simpler.<p>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).<p>Given the speed of AI development, a complete course should take about 18 months, which isn't an exaggeration?