Hacker News new | past | comments | ask | show | jobs | submit login

Did you write that blog post? Cripes, it is amazing. What a brilliant idea. Thank you to share. My brain is wired for C++ templates, and the technique makes good sense!

To your last point: Why not C#? It is interesting did not mention it, as TypeScript came from Microsoft R&D (as I understand).




I did not write the blog post, it was just a simple infer/extends non-trivial example explained in depth, commonly used in packages like express and so forth. TDungeon [1], a game running on the TypeScript type system, really showcases how powerful the type system truly is.

Why not C#? Probably because Anders Hejlsberg [2], lead architect of C# and core developer of TypeScript, wanted something different. More of a sociological, rather than technological, reason.

[1] https://github.com/cassiozen/TDungeon

[2] https://en.wikipedia.org/wiki/Anders_Hejlsberg




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: