Part of it could be due to using Rust as the implementation language. Rust has good, cross-platform abstractions over things like threads and processes. The language tends to make it harder to shoot yourself in the foot.
Would definitely like to hear from the authors of Nushell on how their language choice has held up over the course of the project.
Re:One Year of Nushell
by ridiculous_fish on Tuesday August 25, 2020 @02:13AM
(#24268532)
A related issue is leaking fds into child processes. For example, Go locks around fork() to prevent racing with creating new fds (e.g. from pipe) [1]. Rust doesn't have any synchronization between fork and creating fds; I wonder whether/how this is addressed in nushell.
1: https://golang.org/src/syscall/exec_unix.go?s=7064:7143#L19
Re:One Year of Nushell
by Matthias247 on Tuesday August 25, 2020 @01:31AM
(#24268366)
My guess it doesn't use fork, apart from spawning subprocesses use fork/exec combinations. The old fork idiom isn't exposed by Rusts standard libraries and also wouldn't be "safe" to use, since the basic expecatations of the language about how many things have access to a certain variable wouldn't hold up anymore.
How is Nushell able to use threads? For example how are subshells implemented?