I'm interested. So defer is one of the handful of achievable goals I find Zig interesting and hold some hope for it. Easy to call C from Zig or Zig from C. And Zig can also compile C and target cross-platform easily.
const sprite_sheet_surface = c.SDL_LoadBMP("res/tile.bmp") orelse {
c.SDL_Log("Unable to create BMP surface from file: %s", c.SDL_GetError());
return error.SDLInitializationFailed;
};
defer c.SDL_FreeSurface(sprite_sheet_surface);