Nav Singh
06/02/2020, 9:34 PMfirst()
with collections, It might throw an ExceptionZach Klippenstein (he/him) [MOD]
06/02/2020, 9:35 PMNav Singh
06/02/2020, 9:36 PMNav Singh
06/02/2020, 9:37 PMCasey Brooks
06/02/2020, 9:42 PMCasey Brooks
06/02/2020, 9:44 PMNav Singh
06/02/2020, 9:46 PMZach Klippenstein (he/him) [MOD]
06/02/2020, 9:50 PMCasey Brooks
06/02/2020, 9:52 PM@Throws
annotation for documentation purposes, which does get translated to the throws
clause when used from Java https://kotlinlang.org/docs/reference/java-to-kotlin-interop.html#checked-exceptions. Though the better solution is still just to provide more centralized error-handling and your own APIs/extensions that ensure they are applied in all situationsHanno
06/03/2020, 9:44 AMNav Singh
06/03/2020, 5:21 PMfirstOrNull
my only concern if we get any warning from compiler side