https://kotlinlang.org logo
#announcements
Title
# announcements
c

cdurham

11/07/2017, 6:52 PM
does
@Throws
serve a purpose other than java interop?
p

patrickdelconte

11/07/2017, 7:00 PM
not as far as I'm aware
t

trevjones

11/07/2017, 7:01 PM
Seems like a nice way to be very clear about what might happen from a documentation standpoint. Probably not just a JVM thing or it would have a jvm prefix no?
c

cdurham

11/07/2017, 7:47 PM
@trevjones What does it do in terms of documentation? kdoc supports @throws (not the annotation but as a block tag in the doc) although when you think about the fact that there are no checked exceptions I don't know how much sense it makes. https://kotlinlang.org/docs/reference/kotlin-doc.html
t

trevjones

11/07/2017, 7:49 PM
from the standpoint that selfdocumenting code is better than manually maintained docs
still lots on the human so it is a bit moot
but the point is that good param and method naming beats having to hit the docs any day of the week. shouldn’ the same be true for exception signature?
c

cdurham

11/07/2017, 8:18 PM
I don't see how
@Throws(...)
is any more maintainable than
@throws(...)
and at least the latter will be added into dokka
I guess originally I was asking if it had any effect on calling code that's written in kotlin (which I think the answer to is no)
2 Views