Kotlin (programming language): Difference between revisions

Content deleted Content added
Semantics: optional semicolons, functions
Semantics: functions reference
Line 32:
 
== Semantics ==
Like [[Pascal programming language|Pascal]] and [[Scala (programming language)|Scala]], Kotlin variable declarations and parameter lists have the [[data type]] come after the variable name (and with a colon separator), unlike [[C language|C]] and its derivatives such as C++, Java, C#, and D. As in other modern languages like Scala and [[Groovy (programming language)|Groovy]], semicolons are optional in most cases.<ref>{{cite web | url=http://confluence.jetbrains.com/display/Kotlin/Grammar#Grammar-Semicolons | title=Semicolons | website=jetbrains.com | accessdate=February 8, 2014}}</ref> In additional to the [[Class (computer programming) | classes]] and [[Method_(computer_programming) | methods]] (called member functions in Kotlin) of [[object-oriented programming]] , Kotlin also supports [[procedural programming]] with the use of [[function (computer science) | functions]]. <ref>{{cite web | url=http://confluence.jetbrains.com/display/Kotlin/Functions | title=functions | website=jetbrains.com | accessdate=February 8, 2014}}</ref>
 
'''Hello, world! example'''