2 ms·
Kotlin has almost exactly the same declaration syntax as Pascal, which would seem to me to be the platonic ideal of "language your dad used". Postfix type annot
by djur 11y ago
Kotlin has almost exactly the same declaration syntax as Pascal, which would seem to me to be the platonic ideal of "language your dad used". Postfix type annotations go way back. They permit somewhat less ambiguous syntax for things like function types (see C's infamous function pointer declarations) and play more nicely with type inference (it makes more sense to drop the ': int' in 'a: int' than the 'int' in 'int a').
It's certainly not a radical or nonconformist choice to make while designing a language. It might seem unusual to people whose experience is with C-style declarations, but it really is just replacing one well-known syntax with another, equivalent well-known syntax.