Hacker News new | ask | show | jobs
by BSTRhino 1 day ago
I once had a C# server with a TypeScript frontend (this was for work, so I didn't choose the tech stack). We had one part of the code which had a lot of calculations. We wrote the code in a C# library, then used Roslyn to analyse the C# code and generate TypeScript code that matched it identically. This way the client could visualise the results on the client with zero latency, no server roundtrip, but ultimately the server would be in charge of the final calculations. It was a great solution, I would do it again.

We could have potentially used Fusion for this had it existed, but I don't know if we would. We didn't have to support 12 different languages, only 2.