How to handle errors in Swift when coming from a Java world

I think that we will, eventually, distinguish between fatal faults, and it will be a long and delicate process. You do not handle a System/CPU signal as you handle an out-of-bounds array precondition (unless, of course, array bound checks are implemented on top of some low-level signal). I've heard here and there that one of the practical difficulty will be avoiding memory leaks in case of fault recovery. But I'm no expert, and we don't even have a pitch.

Maybe Swift will become able to fuel pid 1 (the one that never ever panics) one day :-)

Meanwhile the server crowd is crawling its way toward a robust and fast solution, and I think it is natural.

1 Like