News for hackers. Stuff that matters.
Re:Examples of Incorrect Abstractions in Other Languages by uryga on Wednesday May 20, 2020 @07:01AM (#23245438)
so you'd expect this behavior?

  sum("abc") =
  sum(ord(c) for c in "abc") =
  sum([97, 98, 99]) =
  294
because wow, i... can't think of why you'd ever actually want that. (though it'd be perfectly natural for byte arrays)
Re:Examples of Incorrect Abstractions in Other Languages by stouset on Thursday May 21, 2020 @05:12PM (#23265403)
Byte arrays sure. Not strings. This is why having clear types is important! Strings aren't just byte arrays. Characters aren't just bytes.