危及国家安全,这次C++码农真要完蛋了

还珠楼主
楼主 (北美华人网)
今年1月 CISA(Cybersecurity and Infrastructure Security Agency)发布了一份 Product Security Bad Practice提到
The development of new product lines for use in service of critical infrastructure or NCFs in a memory-unsafe language (e.g., C or C++) where readily available alternative memory-safe languages could be used is dangerous and significantly elevates risk to national security, national economic security, and national public health and safety.
A
AprilPearl
完啥,C++码农转Java基本是降维打击
y
yanhren
没看出来为啥就完蛋了,会c++的就没学过其他的语言吗?
还珠楼主
AprilPearl 发表于 2025-05-21 18:07
完啥,C++码农转Java基本是降维打击

但是公司的java职位,人家更倾向要现成经验的,一个10年java码农比一个10年c++码农更符合职位需求
u
usayso
c碾压c++
s
shenandoah1
哈哈,这是不是说Linux要完蛋了,大部分都是C代码。
f
funnyorno
经常有新警察甚至是观念过时的老码农会个C/C++鄙视其他语言跟孔乙己回字几个写法一样,贻笑大方。高薪的互联网码农很少直接用这两个语言的。
r
realsimplejill
AprilPearl 发表于 2025-05-21 18:07
完啥,C++码农转Java基本是降维打击

哈哈😆确实!我们读大学那会儿,语言课顺序是C,同时学机器语言和汇编,C++靠后,最后才是Java,越学越容易。
d
drower
还珠楼主 发表于 2025-05-21 18:05
今年1月 CISA(Cybersecurity and Infrastructure Security Agency)发布了一份 Product Security Bad Practice提到
The development of new product lines for use in service of critical infrastructure or NCFs in a memory-unsafe language (e.g., C or C++) where readily available alternative memory-safe languages could be used is dangerous and significantly elevates risk to national security, national economic security, and national public health and safety.

Google: While Java is often described as platform-independent due to the Java Virtual Machine (JVM), the JVM itself, which forms the lower layer of the Java ecosystem, is typically implemented in C and C++. This means that when Java code is executed, it ultimately relies on C/C++ code at the level of the JVM to interact with the underlying operating system and hardware. C and C++ are used because they offer the necessary control and performance for system-level tasks.
y
yayapig
shenandoah1 发表于 2025-05-21 18:20
哈哈,这是不是说Linux要完蛋了,大部分都是C代码。

Windows 底层没有C ?
还珠楼主
drower 发表于 2025-05-21 18:22
Google: While Java is often described as platform-independent due to the Java Virtual Machine (JVM), the JVM itself, which forms the lower layer of the Java ecosystem, is typically implemented in C and C++. This means that when Java code is executed, it ultimately relies on C/C++ code at the level of the JVM to interact with the underlying operating system and hardware. C and C++ are used because they offer the necessary control and performance for system-level tasks.

你说这些我懂,问题是联邦政府配合这个报告还有个给各公司C-suite executives们看的白皮书,直接把C/C++放火上烤,以后C++职位会越来越少了
第三只熊猫
所有的操作系统,从手机到平板到个人电脑,都是c。最主要的,所有的加密软件都是c写的。 另外c程序怎么影响public health的?
y
yayapig
还珠楼主 发表于 2025-05-21 18:05
今年1月 CISA(Cybersecurity and Infrastructure Security Agency)发布了一份 Product Security Bad Practice提到
The development of new product lines for use in service of critical infrastructure or NCFs in a memory-unsafe language (e.g., C or C++) where readily available alternative memory-safe languages could be used is dangerous and significantly elevates risk to national security, national economic security, and national public health and safety.

这个消息已经有很久了. 问题不在于语言, 在于用这些语言的人. Cybersecurity 现在制定各种规则就是为了保证无论人多笨, 都不会影响到系统安全. 然而然而这些治标不治本, 搞出一大堆protocol, 人不行还是会出问题. 美国政府机构的网络安全就是笑话, 随便找找都是漏洞, 奇怪为什么没有大规模针对州,县这一级的网络攻击.
S
SeaTac007
第一,换个语言就行了;第二也不要有啥优越感的,Java程序员随时用无数的开源framework只是怼死你——看谁能在5分钟内完成一个能上prod的server?
c
claireliu
没有c++哪来的Java,那jvm哪个语言写的?再说现在不得ai了吗,啥语言都无所谓,我把spec扔进去,出来的的code直接使好用的很啊。
m
mvdk
正黄旗出身才能写?
Y
Yourdad
你不会觉得码农只会一种语言吧?语言只是工具 c c++ java go python kotlin 轮番上阵的
x
xianzhiguo
m km
s
suwa
现在AI还不能做C/C++编程,低层语言编程得靠大脑。 越往高走高层编程有被AI部分取代的可能。
很多小众像Mission Critical 大飞机飞控语言ADA,C919飞控编程外包给一家美国公司。 如果用Java Pythson 写,没人敢坐。
d
dubidd
funnyorno 发表于 2025-05-21 18:21
经常有新警察甚至是观念过时的老码农会个C/C++鄙视其他语言跟孔乙己回字几个写法一样,贻笑大方。高薪的互联网码农很少直接用这两个语言的。

互联网公司的C/C++码农薪水还是碾压其他语言的.
卡多司基
我是一路C上来的,C++skip了,直接C#,Java, python了。说真的,靠语言难易来找成就感的,说明你对cs没啥理解。
n
nicecool
AprilPearl 发表于 2025-05-21 18:07
完啥,C++码农转Java基本是降维打击

我学过二十多种编程语言,感觉c最容易。也最得心应手。
c
claireliu
nicecool 发表于 2025-05-22 08:01
我学过二十多种编程语言,感觉c最容易。也最得心应手。

c的standard 就那么两页,单从语言的角度,这还要学吗。
w
wdong
你们真逗,JVM是C++写的。要完蛋一起完蛋。
戊寅期甲辰
AprilPearl 发表于 2025-05-21 18:07
完啥,C++码农转Java基本是降维打击

不觉得。转java的话基本是被打击。
戊寅期甲辰
还珠楼主 发表于 2025-05-21 18:11
但是公司的java职位,人家更倾向要现成经验的,一个10年java码农比一个10年c++码农更符合职位需求

正解,一个java职位,招个三年经验的java选手也比一个十年经验的c++选手强多了。
r
realsimplejill
我是一路C上来的,C++skip了,直接C#,Java, python了。说真的,靠语言难易来找成就感的,说明你对cs没啥理解。
卡多司基 发表于 2025-05-22 07:39

我PHD阶段专门研究语言可用性
一楼提到的都是General purpose languages General purpose languages的趋势是越来越容易学习 就C#而言,微软投入了大量的资源改善可用性和IDE对developer的支持 我认为developer是最under supported的一类用户,语言设计是很深的一门学问 我们读书那会儿上来直接学C和汇编是很打击积极性的😂
Domain specific languages最大的优势是和它所为之设计的领域紧密相关,方便domain expert上手使用,比如MATLAB,JavaScript,这类语言容易学,但也会被鄙视,因为“简单”。但这正是他们的优势。



I
Isabella625
CISA 的意思其实不是说C语言本身“邪恶”,而是它太容易出错,特别是当业余程序员用它写“关键系统”时,问题就大了。就像F1赛车技术很先进,但让普通人天天开F1上街,就是事故多发
b
badgerbadger
CISA 的意思其实不是说C语言本身“邪恶”,而是它太容易出错,特别是当业余程序员用它写“关键系统”时,问题就大了。就像F1赛车技术很先进,但让普通人天天开F1上街,就是事故多发
Isabella625 发表于 2025-05-23 16:26

不是说层主啊,但这岂不是拉不出💩怪茅坑
问题的关键是程序员水平不行,换个语言能给你在更隐秘的地方捅更大的篓子。
扶苏
LZ应该不是学cs的吧。所谓memory-unsafe,其实就是pointer,可以由programmer自己allocate memory,自己清理这个memory。那么,当然就有可能introduce bug,比如access invalid memory,memory corruption之类的。
而memory-safe的language,就是这个language有自己的garbage collection,它来控制所有memory,不给人犯错误的空间。
可是,这种memory-safe的language,有很大的弊端,第一,overhead,library庞大,run起来costly。第二,对于低层processing,尤其real time processing,data processing,绝对是直接可以allocate memory, access pointer更加efficient。只要是跟机器打交道的,用c, c++是no brainer。
很多网络开发用memory safe language,可能更make sense。开发手机app,这个我不太熟,可能因为某些OS限制,所以用的语言可能也有限制。但是对于我这种,直接在机器上run的program,除了user interface,当然用C++,而对于我们公司firmware engineer来说,当然用C啦。
而且,c 和 c++都多少年了,还在用,可见其不可替代性。
扶苏
suwa 发表于 2025-05-22 06:31
现在AI还不能做C/C++编程,低层语言编程得靠大脑。 越往高走高层编程有被AI部分取代的可能。
很多小众像Mission Critical 大飞机飞控语言ADA,C919飞控编程外包给一家美国公司。 如果用Java Pythson 写,没人敢坐。

我用copilot去分析已经有的老旧的C++的class,基本搞不清楚,还得我们人自己去读。C写的东西更加是这样,有很多trick,copilot搞不清楚。而越“高级语言,越容易被AI理解。
扶苏
claireliu 发表于 2025-05-22 08:59
c的standard 就那么两页,单从语言的角度,这还要学吗。

别看简单,现在的人很多都不太会用。用C就是用自己的逻辑,去理解问题,然后想出办法。而年轻人在训练上,过早接触”高级“语言,反而engineer的思维训练不够。所以做出的东西很容易把问题复杂化,搞一堆syntax很酷,其实根本不需要的东西。