https://kotlinlang.org logo
#language-proposals
Title
# language-proposals
l

LastExceed

03/07/2020, 3:28 PM
language design question:
Copy code
interface MyInterface<T> {} //interface declaration
class MyClass<T> : MyInterface<String> {} //class declaration and interface implementation
val x = MyClass<String>() //class construction
fun <T> foo() {} //function declaration
val y = foo<String>() //function call
type parameters are always specified after the name, except in the case of function declarations. why this inconsistency? why isnt the syntax for it like this
Copy code
fun foo<T>() {}
to be consistent ? Slack Conversation