News for hackers. Stuff that matters.
Re:On Apple's Love Affair with Swift by saagarjha on Saturday August 11, 2018 @01:30PM (#17740625)
This isn’t what Swift means when it says it’s safe. “Safe” doesn’t mean your program doesn’t have bugs or can’t crasg; rather, it will never have to deal with things like memory corruption and related undefined behavior. In fact, Swift considers crashing rather than allowing such errors to propagate to be an explicit design goal.
Re:On Apple's Love Affair with Swift by slavapestov on Saturday August 11, 2018 @08:51PM (#17742340)
Right; this is why integer operations trap on overflow by default, instead of silently wrapping, for example. Technically you’ll “crash” more but the crash occurs at the exact location of the problem and not much later in the form of corrupted data.
Re:On Apple's Love Affair with Swift by valuearb on Sunday August 12, 2018 @02:09AM (#17743157)
It’s the difference between a crash pointing exactly at the cause, and spending days or weeks isolating crashes that only occur minutes after the error that caused them, or only on certain devices, or in certain memory configurations, or only on every other Sunday, etc.