Hacker News new | ask | show | jobs
by julius 5015 days ago
Looks very interesting.

How would Instant C# scale up to real code? What about that bank application that has the side effect of throwing 100$ away from your account on each execution?

3 comments

I see it working hand-in-hand with dependency injection. So resolved mock interface implementations will be used by Instant.
Wow, this is a great idea!
The trick is that you simply wouldn't use this on code where irreversible side effects take place. I think there's enough methods you write where this would help to make it still useful and worthwhile. Tackling the side effect issue is far, far too big of scope.
Side effects is definitely the biggest problem to solve here. For SQL you can start a transaction and roll it back afterwards. Disk access can be done with snapshots. Network traffic... well I guess it depends on what you're doing exactly. There's lots to do but it can work.