News for hackers. Stuff that matters.
Re:Bringing Objective-C to the Amiga by aplummer on Monday April 23, 2018 @04:26AM (#16901539)
Also I agree you can tell safety was the number one priority. However the positive is basically never getting runtime errors, except when interfacing with IB or obj-c even when people are programming in a hurry, which is nice for me.
Re:Bringing Objective-C to the Amiga by saagarjha on Monday April 23, 2018 @04:32AM (#16901578)
> However the positive is basically never getting runtime errors

I don't quite think this is the "safety" that Swift aims for: rather, it prefers safety in the sense of failing fast and failing reliably if something goes wrong. Unwrapping nil and out of bounds array subscripting fall into this category of behavior.

Re:Bringing Objective-C to the Amiga by LeoNatan25 on Monday April 23, 2018 @05:07AM (#16901761)
"Never getting runtime errors" is as far fetched as it can be. Consider Xcode suggesting developers use force unwrap ("!"), that leads to many more crashes with unexperienced developers than the ObjC message to nil paradigm.

Subjectively, I have seen much more crashes in third-party software written in Swift than in ObjC (usually unwrapping or casting incorrectly), including in Apple's software. I cannot say if this is down to more inexperienced developers, less time allotted to experienced developers or a worse development model. I'd say a combination of the three.

Re:Bringing Objective-C to the Amiga by aplummer on Monday April 23, 2018 @04:55PM (#16907301)
I didn’t know it suggested force unwrapping, I always have a linter to prevent it except for IBOutlets etc.
Re:Bringing Objective-C to the Amiga by saagarjha on Tuesday April 24, 2018 @03:32AM (#16910637)
This might also be because Swift is more likely to crash than fail silently at runtime.
Re:Bringing Objective-C to the Amiga by aplummer on Tuesday April 24, 2018 @11:13PM (#16918397)
I don’t see how this is possible, example?
Re:Bringing Objective-C to the Amiga by mpweiher on Monday April 23, 2018 @04:43AM (#16901644)
Hmm...like making every arithmetic operation a potential crash site?