I feel the same way about "Quake implemented in CSS" demos. Like, very cool, but you actually should not be able to do that...
I feel the same way about "Quake implemented in CSS" demos. Like, very cool, but you actually should not be able to do that...
Doesn't TS do exactly this? It doesn't seem like setting a cap on recursion depth would disqualify something from being Turing complete. Or am I misunderstanding your comment?
(Similar to how every Turing complete programming language today runs on something technically weaker than a Turing machine due to finite memory.)
[0] https://herringtondarkholme.github.io/2023/04/30/typescript-...
Iteration (loops) are typically represented as jump or branch instructions while recursion requires the creation of a new stack frame on the call stack.
That sounds like a reasonable resolution.
type MultiDimArray<T> = T[] | MultiDimArray<T>[];
type LinkedList<T> = {
value: T,
next: LinkedList<T> | null,
};
type Json = string | number | null | Json[] | { [k: string]: Json };JavaScript taxes interface complexity through increased cognitive load. Typescript frees developers from that tax and harms architecture in the process.
Funny how business gurus keep saying over and over that incentives are everything and yet when it comes to choosing developer tools for their businesses, they choose tools which promote terrible incentives, instead they choose "that which sounds good"... It's like communism. It sounds good in theory but it fails spectacularly at the incentive layer... It fails at the most important layer.
This isn't theoretical; the only reason TypeScript allows for such complex interfaces is precisely because JavaScript devs have created those interfaces, and TypeScript makes a best-effort to make as much JS code type-able as possible.
(In the case of TS, see https://github.com/microsoft/TypeScript/issues/14833)
If anyone has more historical evidence that this is so for CSS, reactions from original authors, etc, or further evidence in the case of TS, I'd be curious to see it.
Also CSS can't iterate so it's just at the level of arithmetic.
Edit: Additionally, it takes very little to define a specification that leads to emergent behavior. That’s not necessarily a bad thing. It’s been awhile, but all you need for a turing machine is a way to store and read memory, and move the tape (instruction pointer) if I remember right. If that’s correct, you can come up with an infinitely complex machine with 3 instructions (provided you have an infinite amount of tape).
(It's a double-edged sword because it lets the TypeScript compiler move much faster than any other I've seen, but the lack of standardization regularly causes unintended breaking changes, and developing a competing-but-compatible type checker is basically impossible.)