News for hackers. Stuff that matters.
Re:Swift is like Kotlin by desdiv on Thursday May 18, 2017 @12:38AM (#14364843)
I prefer explicit words over symbols, like in Scala:

scala> 1 to 3

scala.collection.immutable.Range.Inclusive = Range(1, 2, 3)

scala> 1 until 3

scala.collection.immutable.Range = Range(1, 2)

Re:Swift is like Kotlin by menage on Thursday May 18, 2017 @02:01AM (#14365121)
As someone who's never programmed in Scala, it's not intuitive to me at all that "until" means exclusive, given that "to" (which is basically a synonym) means inclusive.
Re:Swift is like Kotlin by lauritzsh on Thursday May 18, 2017 @07:59AM (#14366495)
How would you feel about

  > 1 through 3
  # [1, 2, 3]

  > 1 until 3 # or 1 to 3
  # [1, 2]
as explicit word range notation?
Re:Swift is like Kotlin by Cyph0n on Thursday May 18, 2017 @01:01AM (#14364934)
Agreed, Scala's approach to ranges is one of the best out there from my experience.