aboutsummaryrefslogtreecommitdiff
path: root/posts
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-06-18 06:09:57 +0100
committerAkshay <[email protected]>2020-06-18 06:09:57 +0100
commit3739ce5d1969df71f272d18a3ff8b5e13cd27f4f (patch)
treea78ba875dbc37b23e5211e9aa6fa7293704110c3 /posts
parent43032d7952c9dafce3ba8590db928cfd7edf5519 (diff)
new post: turing complete type systems
Diffstat (limited to 'posts')
-rw-r--r--posts/turing_complete_type_systems.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/posts/turing_complete_type_systems.md b/posts/turing_complete_type_systems.md
new file mode 100644
index 0000000..b6ec7bc
--- /dev/null
+++ b/posts/turing_complete_type_systems.md
@@ -0,0 +1,22 @@
1Rust's type system is Turing complete:
2
3 - [FizzBuzz with Rust Traits](https://github.com/doctorn/trait-eval/)
4 - [A Forth implementation with Rust Traits](https://github.com/Ashymad/fortraith)
5
6It is impossible to determine if a program written in a
7generally Turing complete system will ever stop. That is, it
8is impossible to write a program `f` that determines if a
9program `g`, where `g` is written in a Turing complete
10programming language, will ever halt. The [Halting
11Problem](https://en.wikipedia.org/wiki/Halting_problem) is
12in fact, an [undecidable
13problem](https://en.wikipedia.org/wiki/Undecidable_problem).
14
15*How is any of this relevant?*
16
17Rust performs compile-time type inference. The type checker,
18in turn, compiles and infers types, I would describe it as a
19compiler inside a compiler. It is possible that `rustc` may
20never finish compiling your Rust program!
21
22I understand that this post lacks content.