:: Re: [DNG] About the rust language
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Bruce Perens
Fecha:  
A: Steve Litt
Cc: dng
Asunto: Re: [DNG] About the rust language
If You can't get away from the C language, write in Zig. I can testify,
however, that there was a lot of craft knowledge attached to C and Unix
that wasn't in K&R.

Thread safeness in C was possible but the language offered no guarantees
and success was based on your wizard quotient, and took longer than
necessary.

One lesson was when I released Electric Fence. A number of workstation
operating systems had to do unplanned releases because so many bugs showed
up in their system libraries, and suddenly every coder could see them.

Rust is a lot closer to offering the guarantees you need to do thread safe
shared memory, not that I wouldn't do Hoare's CSP instead. And it pretty
comprehensively deals with the issues of pointers, and no one even took on
ownership other than Rust, most designers threw up their hands and went to
garbage collection.

I agree that the learning curve of Rust is obnoxious. If I get the choice,
I'll be writing systems code in Rust and applications in Crystal. Go
doesn't seem to have much to offer next to Crystal.

One problem we have is that libraries are going to be a thing of the past.
The XZ issue showed us that. You will still write code that looks like a
library, but it will actually be a service, it won't reside in the same
address space, and it won't have any more privileges than it needs.

So back to things that Mach tried in the '80s. And Ada did it on the
iapx432, the architecture manual for that still reads like alternate
history fiction. We have the CPU power to support that stuff now. And
whatever language you use will be making those calls easy to write and high
performance.