News for hackers. Stuff that matters.
Re:Why Is Swift's String API So Hard? by moron4hire on Friday November 06, 2015 @11:18AM (#10520232)
That might be the origin, but that is not the current implementation. For example, URLs only ever count as 23 letters, because they always get shortened using Twitter's own t.co shortener. BUT they still display in their original form, so unless they are de-referencing the shortened URL on the fly, they have to be storing what the user typed and a pre-processed form of the text are being stored. That's a lot more than 140 ASCII characters.
Re:Why Is Swift's String API So Hard? by mikeash on Friday November 06, 2015 @01:19PM (#10520964)
What's really fun is that URLs always count as 23 characters even if they're shorter. For example, I had a tweet about Apple's Keynote.app fail to send the other day, because Twitter thought "Keynote.app" was a URL and "shortened" it such that my tweet exceeded the length limit afterwards. Fun times.
Re:Why Is Swift's String API So Hard? by moron4hire on Friday November 06, 2015 @03:15PM (#10521728)
Yeah, it's not good. I think Twitter would do well to not hurt users with things like that. Use the restraint of UI to keep people's posts small. It's difficult to type a screed into a single-line textbox. But get rid of any actual character limit at all.