<@U0926QHA6>: I haven't got a firm opinion on iss...
# language-proposals
m
@apatrida: I haven't got a firm opinion on issue https://youtrack.jetbrains.com/issue/KT-8695, I really do agree with you that some form of indicator prevents bugs. For me the question is not so much what the indicator should be, but mostly when will it be optional, when will it be enforced? I guess this is the question everybody wants to see an answer to. there are about 3 cases on which my opinion differs: 1. one liners: prefer no indicators 2. factory methods: would prefer an indicator 3. blocks: prefer no indicators so as an example
Copy code
kt  
//one liner
foos.map {foo.a > 1}

//factory method style
cache.getOrCreate(key) {
  build()
  build()
  emit bar
}

//blocks 
foos.forEach {
  sum(it)
}