News for hackers. Stuff that matters.
Re:The Swift compiler is slow due to how types are inferred by amomchilov on Thursday June 13, 2024 @05:36AM (#40667613)
`print((a + b + c) as String + n + d + e)`

(I’m not sure of the precedence, that might need another pair of parens)

Re:The Swift compiler is slow due to how types are inferred by floxy on Thursday June 13, 2024 @12:05PM (#40671364)
Interesting. This:

  let a:String = "a" as String
  let b:String = "b" as String
  let c:String = "c" as String
  let d:String = "d" as String
  let e:String = "e" as String
  let n:Int = 11 as Int
  
  print((a + b + c) + n + d + e)
...has the long timeout, while:

  let a:String = "a" as String
  let b:String = "b" as String
  let c:String = "c" as String
  let d:String = "d" as String
  let e:String = "e" as String
  let n:Int = 11 as Int
  
  print((a + b + c) as String + n + d + e)
...fails pretty much instantaneously.