3 ms·
>I don't even understand why you'd want to remove functional programming from a low level language like Rust Because I want a simple to read language? It's no
by dispose13432 10y ago
>I don't even understand why you'd want to remove functional programming from a low level language like Rust
Because I want a simple to read language?
It's not all about performance. C++ doesn't have bad performance and is safe, yet isn't used in Linux, nginx, or OpenBSD.
Why?
I've heard here how every team has their "subset" of the language that they use.
So you're trying to unseat C from it's perch. Fine. I understand, it's too easy in C to have memory errors and pwn computers.
But if you want to fix that by forcing people to switch to a different paradigm, it aint gonna happen.
Out of the top 10 programming languages on GitHub, most (by far) are imperative.
If someone would make a safe C, there can be hope in convincing Linus to slowly switch.
Now? There's 0 chance of that happening.
- pjmlp 10y ago> C++ doesn't have bad performance and is safe, yet isn't used in Linux, nginx, or OpenBSD. >Why? Because those communities, logically due to the UNIX influence, are biased towards C. C++ is heavily used on Android and ChromeOS native subsystems, Mac OS X drivers, Windows, Genode. Symbian and BeOS were written in C++.
- dispose13432 10y ago>Because those communities, logically due to the UNIX influence, are biased towards C. Not Linux (Warning: Typical Linus rant - http://harmful.cat-v.org/software/c++/linus http://harmful.cat-v.org/software/c++/linus).
- pjmlp 10y agoYet even Linus does use C++ nowadays: https://github.com/torvalds/subsurface https://github.com/torvalds/subsurface
- akiselev 10y ago> Because I want a simple to read language? So you want to make a language simpler to read by removing a paradigm that produces much more readable and less error prone code for a wide variety of very common use cases? I'm sorry but that makes no sense. You're saying that imperative code is always more readable, no matter what the problem is, and that is fundamentally untrue. Otherwise we wouldn't have a bazillion programming languages, paradigms, and syntax styles. C++ doesn't have bad performance, it has worse performance. Linus has made some very public comments about why he doesn't want C++ in the Linux kernel and it isn't because it's hard to read or slow, but because it's too complicated especially when some of the more advanced features interact. Rust was built to avoid many of these downsides. Rust doesn't force you to switch to a functional paradigm and I have no idea where you got that from. I explicitly said "remove functional programming from a low level language like Rust" not "switch to a functional programming language altogether."
- kibwen 10y agoThere's a zero percent chance of a language switch in the kernel happening regardless of how similar a language is to C, so there's no sense in designing a language specifically to appeal to Linus. :P After all, if Linus isn't satisfied with C, he's more than capable of writing his own language (see also git).