It can do a Y Combinator with types can't it?
Show HN: Conway's Game of Life in TypeScript's type system
21–30 of 48 posts
Re: Show HN: Conway's Game of Life in TypeScript's type system
#22Sometimes I think I don't understand TypeScript's type system and then I see something like this and I realize I know even less than I thought
Any sufficiently capable type system will make it possible to implement a form of functional programming. These advanced type systems are essentially a form of pre-compile time scripting to assert certain guarantees about user defined types. It's the same mechanism that makes C++ templates turing complete.
[0] https://www.typescriptlang.org/docs/handbook/2/template-lite...
Re: Show HN: Conway's Game of Life in TypeScript's type system
#23Love it! Reminds me of the hilarious "Typing the technical interview" [1] and "Typescripting the technical interview" [2], a couple of my favorite blog posts of all time. [0] https://aphyr.com/posts/342-typing-the-technical-interview [1] https://www.richard-towers.com/2023/03/11/typescripting-the-...
Re: Show HN: Conway's Game of Life in TypeScript's type system
#24Sometimes I think I don't understand TypeScript's type system and then I see something like this and I realize I know even less than I thought
Any sufficiently capable type system will make it possible to implement a form of functional programming. These advanced type systems are essentially a form of pre-compile time scripting to assert certain guarantees about user defined types. It's the same mechanism that makes C++ templates turing complete.
Re: Show HN: Conway's Game of Life in TypeScript's type system
#25It can do a Y Combinator with types can't it?
Re: Show HN: Conway's Game of Life in TypeScript's type system
#26I'm really confused, is it what TS is supposed to looks like?
Re: Show HN: Conway's Game of Life in TypeScript's type system
#27Cute :) Any sufficiently advanced type system is indistinguishable from an interpreter!
Re: Show HN: Conway's Game of Life in TypeScript's type system
#28Love it! Reminds me of the hilarious "Typing the technical interview" [1] and "Typescripting the technical interview" [2], a couple of my favorite blog posts of all time. [0] https://aphyr.com/posts/342-typing-the-technical-interview [1] https://www.richard-towers.com/2023/03/11/typescripting-the-...
I think you have an off-by-one error there!
Re: Show HN: Conway's Game of Life in TypeScript's type system
#29Earlier quoted context omitted.
Any sufficiently capable type system will make it possible to implement a form of functional programming. These advanced type systems are essentially a form of pre-compile time scripting to assert certain guarantees about user defined types. It's the same mechanism that makes C++ templates turing complete.
Any sufficiently advanced type system is indistinguishable from Prolog.
If feeling adventurous, read e.g. https://lpn.swi-prolog.org/lpnpage.php?pagetype=html&pageid=...
Re: Show HN: Conway's Game of Life in TypeScript's type system
#30If anyone else is interested in an internship or full-time position in typescript: https://www.uncountable.com/hiring/hn