News for hackers. Stuff that matters.
Re:Embedded Swift on the Raspberry Pi Pico by troupo on Wednesday March 06, 2024 @12:27PM (#39618354)
I don't think any of that has to do anything with static analysis deficiencies. The analysis is the same. What Swift requires is for the user to manually help the compiler with a rather verbose and otherwise unnecessary construct.

Type narrowing is not a new idea

Re:Embedded Swift on the Raspberry Pi Pico by saagarjha on Wednesday March 06, 2024 @12:43PM (#39618540)
It’s not a new idea, but I don’t think it’s a good idea. That’s just it. Swift has a construct to do the equivalent and it’s fewer characters to boot when compared to Dart when you’re going from an optional to non-optional type.
Re:Embedded Swift on the Raspberry Pi Pico by troupo on Wednesday March 06, 2024 @02:42PM (#39620369)
But that's exactly what Swift does: it narrows the types. To do that, it uses a separate construct that only exists to make the parser ever so slightly simpler.
Re:Embedded Swift on the Raspberry Pi Pico by saagarjha on Saturday March 09, 2024 @05:07AM (#39650678)
Yes and I think having a separate construct rather than using another one and imbibing it with new meaning is more elegant