Thanks. So I want to start off with a question I had. So when you were porting instead of rewriting, there was a lot of benefits, but there were a few extra things you had to do if you hadn't rewritten. So for people considering this, when do you think that it's actually better to just rewrite compared to port? Because there could be some extra complexity with porting. That's a good question. I'm not entirely sure. I'm almost tempted to say, like, you should almost always port. Like, porting was painful, it was tricky. At many points it was the most annoying thing, but I think it paid off because rewrites are really hard. Like, so one thing I didn't talk about is, like, if we had gone the rewrite route, like, would we have still kept updating the Go code? Because if we didn't, well, our users would just be stuck and wouldn't get any new features or bug fixes. But if we did, then, well, the REST code would have to catch up. It would be this sort of, like, never-ending race. And so I would say that, like, maybe if you have really good institutional knowledge of the product, you've worked, your team has worked on it for a really long time, and you have the, like, buy-in to spend the next, you know, year or two rewriting, then maybe it's worth it. But otherwise, I'd say you should probably port.
Okay, and let me check the questions here. So from Brian, were there some patterns in the code you couldn't replicate exactly in REST due to borrow-checker? Um, a little bit, nothing that crazy. Like, there were definitely some cases where you'd have to think about the code really carefully, and you would also maybe realize that the GO code had some issues that had never been, like, seen before. Like, I realized while porting some of the caching code that there was, like, a slight race condition that had never been caught in a GO code that the REST code wouldn't allow. And so you did run into those. But overall, TurboRepo was a very amenable project to being written in REST because the lifetimes were not very complicated.
Okay. And next from John, if you knew about the glibc issue beforehand, would you have still chosen to port? Yeah. I mean, you know, it was annoying, but it eventually worked out, and, you know, yeah, it wouldn't have been a showstopper long-term. Yeah. Next question. Is it possible to port TypeScript to REST using this similar strategy? Probably. You could use something like an API to interoperate and then incrementally move things. I think also, like, using serialization could be an interesting technique where you basically just send almost, like, messages over the wire. I think you could do this with any language, and I think also the ecosystem for interoperability is getting better and better. Like, I think there are more tools out there that help you.
Comments