Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 4
    Your assumptions are incorrect. Other statically-typed languages follow the same convention, for example Scala. Commented Mar 3, 2016 at 23:03
  • 4
    TypeScript also follows this convention. Commented Mar 3, 2016 at 23:03
  • 6
    Not to mention, Standard ML, Ocaml, Haskell and Swift. Commented Mar 3, 2016 at 23:17
  • 8
    See also: Eric Lippert's description of why using the C style syntax in C# was probably a mistake. Commented Mar 4, 2016 at 10:29
  • 4
    It is not a question of dynamic vs static. Languages based on C syntax have type before identifier because this is how C did it. But many static languages have type after the identifier. So it comes down to the question if the language should "look like C" or not. Java follows the "look like C" tradition, so in order to offer improvements over Java, Kotlin has to break with the C tradition when they think it can lead to improved syntax. The advantage of type-after-identifier is it can support type inference in a nicer way. C did not have type inference, so it wasn't an issue for C. Commented Mar 4, 2016 at 15:27