RUST В LINUX: FLAWLESS VICTORY!
Помните, полтора года назад была битва при dma_alloc_coherent() за то, быть или не быть Расту в ядре линукса, ибо сишные газогенераторы такие газогенераторы и не хотели учиться?
Интрига разрешилась с блеском: теперь вопрос стоит не “будет ли в ядре Раст?”, а “будет ли в ядре С?”. На связи - правая рука Линуса Торвальдса, Грег Кроа-Хартманн:
Гейм, сет и матч. Можете выкидывать плюсы из всех учебных программ, через 10 лет их место будет рядом с коболом, perl’ом и actionscript’ом.
Остается добавить, что TIOBE index, который я не очень люблю, только что отметил 25-летие, и Rust только что впервые вошел в его top-10 (Python, естественно, первый с колоссальным отрывом).
Rust - новый Python.
Помните, полтора года назад была битва при dma_alloc_coherent() за то, быть или не быть Расту в ядре линукса, ибо сишные газогенераторы такие газогенераторы и не хотели учиться?
Интрига разрешилась с блеском: теперь вопрос стоит не “будет ли в ядре Раст?”, а “будет ли в ядре С?”. На связи - правая рука Линуса Торвальдса, Грег Кроа-Хартманн:
"A number of years ago, when a friend of mine said, 'Ah, you got to try this new language. It's called Rust.' I was like, 'What? No, C is great.' His friend continued, "'No, no, no! It makes programming fun again.' I'm like, 'Nah, programming is fun in C.' He was right. I should have done it then. Rust is actually fun. It makes programming fun. It takes a lot of stuff away from having to worry about the compiler, which can fix a lot of your problems for you, and it makes code a little bit better."
“New drivers for some subsystems are only going to be accepted in Rust. Look at the graphics subsystem, the most complex drivers out there that it is today; those guys are going to be in Rust only," Binder, the Android IPC mechanism at the heart of billions of devices, now has parallel C and Rust implementations in the kernel. The C version "will go away soon," leaving the Rust version "as the bedrock of all Android devices going forward."
"This experiment is now no longer an experiment. The kernel community maintainers came together last year … and we said the Rust experiment is over. It's real. We're going to accept this thing going forward."
"Here is my statement, totally unscientific. I've seen every CVE the kernel has done in the past 25 years. I think 80% would be gone, just because they would be caught by Rust. Rust will still crash just fine. You can do really foolish things in Rust, but all the tiny, stupid, trivial things Rust will handle for us.”
"We have the guards, the scoped reference counting, to C because Rust showed us we could. We added a lot more memory safety stuff to the kernel and other APIs because we realized Rust showed us we could do that, and we made the C code more reliable and better. So if Rust were to disappear tomorrow, the kernel's better off for it.”
“Rust also gives us the ability to define our in-kernel APIs in ways that make them almost impossible to get wrong when using them. We have way too many difficult/tricky APIs that require way too much maintainer review to 'ensure that you got this right,' that is a combination of both how our APIs have evolved over the years (how many different ways can you use a 'struct cdev' in a safe way?) and how C doesn't allow us to express APIs in a way that makes them easier/safer to use. Forcing maintainers of these APIs to rethink them is a GOOD thing, as it is causing us to clean them up for EVERYONE, C users included already, making Linux better overall.”
Гейм, сет и матч. Можете выкидывать плюсы из всех учебных программ, через 10 лет их место будет рядом с коболом, perl’ом и actionscript’ом.
Остается добавить, что TIOBE index, который я не очень люблю, только что отметил 25-летие, и Rust только что впервые вошел в его top-10 (Python, естественно, первый с колоссальным отрывом).
Rust - новый Python.