2 ms·
Optional-chaining in other languages gives you the same ergonomics without the funky semantics
by brundolf 5y ago
Optional-chaining in other languages gives you the same ergonomics without the funky semantics
- happytoexplain 5y agoThere is this weird disconnect going on in this article and therefore the HN comments. The author's first sentence is, "I don’t code much in Objective-C these days but one thing I miss about it compared to Swift is how nil works." He's not just saying "this part of Obj-C's nil is good", he's saying, "this part is good even compared to Swift", which makes no sense because his "before" example in the before-and-after is Obj-C, and not Swift. The HN comments then proceed to enumerate the advantages of modern handlings of null, of which Swift is a prime example. The author's lack of clarity is understandably causing this.