Hacker News new | ask | show | jobs
by Decabytes 10 days ago
For clarity in this dual programming language scenario I'm talking about, I'm writing a user facing app that's mostly a lot of business logic.

It's running slow so I profile it and I see my math function in pure Dart (or whatever language you are writing in) is the hot spot, and pressures the garbage collector too much, so I rewrite the function in a lower level language that doesn't have as much overhead, to speed things up. Then I just call it from the higher level language through the FFI.

The benefit of Zig is the syntax is simple, and the build steps are simple, so it doesn't slow down app development too much

1 comments

For this example the safe Rust seems like exactly the right choice to me but that's just me.