3 ms·
I wouldn't use Swift anywhere that I didn't have to until the terribly klunky and overly verbose Strings API is fixed - https://news.ycombinator.com/item?id=105
by WayneBro 10y ago
I wouldn't use Swift anywhere that I didn't have to until the terribly klunky and overly verbose Strings API is fixed - https://news.ycombinator.com/item?id=10519711 https://news.ycombinator.com/item?id=10519711
This is a typical Apple product to me - they obsessed over their idea of correctness and ended up with something that is difficult to use and completely alien. Meanwhile every other language offers convenience without even stopping you from doing anything else that you might need to do with Unicode...
- nicky0 10y agoTo me, the Strings API is one of the best things about Swift. Strings are complicated and as Mike Ash says in that very article, "Swift doesn't sugar-coat it, but instead shows you the reality of what's going on. This can be difficult, but it's no more difficult than it needs to be."
- WayneBro 10y agoAssembly is complicated too. I want it sugarcoated most of the time though. There are very few times when I need to drop down into assembly.
- nicky0 10y agoI don't accept assembly as a valid analogy.
- WayneBro 10y agoI don't accept your non-acceptance of assembly as a valid analogy except I'll actually tell you the reason why - you didn't give any reasoning whatsoever. This is a perfectly valid analogy. Visible characters in a strings are to Unicode code points as high-level functions in high-level code are to assembly commands. Furthermore, even without using an analogy I'm quite comfortable in saying, again, that I want Strings sugarcoated because 99.9% of the time I don't give a fuck about some bullshit ivory tower corrected view of things that makes the common scenario more difficult than it needs to be.
- deleted 10y ago[deleted]