* Algebraic data types
* Resource acquisition is initialization
* Aliasable XOR mutable
I think it can help not only to design a Smaller Rust as discussed here, but also to grasp the key design points of this language which is a bit daunting.
* Algebraic data types
* Resource acquisition is initialization
* Aliasable XOR mutable
I think it can help not only to design a Smaller Rust as discussed here, but also to grasp the key design points of this language which is a bit daunting.
> the necessary components ... to make imperative programming work as a paradigm
You know, before Rust imperative programming just didn't work. Didn't work as a paradigm, even!
But one of the primary motivators for functional purity is to avoid unintended side-effects.
In pure FP, You never even have to bother your mind with unexpected side-effects because there are no side-effects.
Rust instead gives you the vocabulary to carefully articulate intended side-effects, preventing all other, unexpected side-effects at the same time. So you can colonize the wilderness, instead of avoiding it altogether, and for that you get to skip the overhead of treating everything as immutable. Not that this is an indisputable improvement for every use-case, but it's a novel tradeoff and one that is definitely preferable in many domains.
Apparently the Linux kernel, and all code written before 2010 is just completely random!
The Linux kernel is well known to be completely random when considered as a C program: building something useful out of it relies on a particular set of flags and ad-hoc implementation details of GCC (e.g. -fno-delete-null-pointer-checks).
That makes it esoteric, not random. If the Linux kernel really did produce "random output" there is no way it would serve as the backbone of the global computing infrastructure, the financial system etc.
To the extent that Linux is useful, it's not written in C. The particular binaries produced by GCC with particular flags have particular behaviour, more or less, but considered solely as a C program in terms of the C standard (i.e. behaviour on the C abstract machine), Linux does produce random output.
[0] https://lwn.net/SubscriberLink/793253/6ff74ecfb804c410/
[1] https://lkml.org/lkml/2018/6/5/769
[2] https://bugzilla.redhat.com/show_bug.cgi?id=638477#c129
[3] http://lkml.iu.edu//hypermail/linux/kernel/1407.3/00650.html
That's from the previous paragraph. So yeah, out of context it's a bad quote, but in the context it's a little less hoity toity.