What is Kotlin? • Statically typed. • JVM-targeted. • general-purpose. • programming language. • developed by JetBrains. • Docs available today. • Bet...
Literatúra. ▫. Kotlin in Action https://github.com/panxl6/Kotlin-in-action/blob/ master/ebook/Kotlin_in_Action_v12_MEAP.pdf. ▫. Programming in Kotlin https:// www.packtpub.com/application-development/programming-kotlin
Preface Programming is understanding. – Kristen Nygaard I find using C++more enjoyable than ever. C++’s support for design and programming has
Introduction to the Java Programming Language ... automatic coercions, free. Software Design (Java Tutorial) ... Structure of a simple Java Program
From The Handbook of Object Technology (Editor: Saba Zamir). CRC Press LLC, Boca Raton. 1999. ISBN 0-8493-3135-8. An Overview of the C++ Programming Language
Jan 3, 1988 ... and similar tasks. It makes precise the behavior of features that were not spelled out in the original definition, and at the same time states explicitly which aspects of the language remain machine-dependent. This second edition of T
mixins and traits. Third, views enable component adapta- tion in a modular way. The rest of this paper gives an overview of Scala. It expands on the following key aspects of the language: • Scala programs resemble Java programs in many ways and they
Kotlin, The Pragmatic. Language For Android. Mike Gouline. Android Developer gouline.net • @mgouline • +MikeGouline ... What is Kotlin? ➔ Perfect for Android. ➔ Performance and cost. ➔ Case study. ➔ Migration guide. ➔ Community adoption. ➔ Current is
MIPS Assembly Language Programming CS50 Discussion and Project Book Daniel J. Ellard September, 1994
Kotlin for Android Developers: Learn Kotlin the easy way while developing an Android App PDF Download. Book Download, PDF Download, Read PDF, Download PDF, Kindle
Outline: The Future of Kotlin ... Android Client iOS Client ... • Kotlin is a Tool for Developers • Elegance is great
Apr 10, 2010 ... Library of Congress Cataloging-in-Publication Data. Stroustrup, Bjarne. The C++ Programming Language / Bjarne Stroustrup. — 3rd. ed. p. cm. Includes ... Preface to Second Edition vii. Preface to ..... between C and C++ and between St
download Kotlin for Android Developers: Learn Kotlin the easy way while developing an Android App - Antonio Leiva .pdf Programming & App Development
C – programming E.Balagurusamy - Tata McGray Hill. 4. ... C successfully combines the structure of a high level language and the power and efficiency of ..... constant), contains a single character enclosed with a pair of single quotes. Character con
TSPL/TSPL2 Programming Language PROGRAMMING MANUAL TSC BAR CODE PRINTER SERIES
Applications (VBA), the macro programming language that is included with: ... VBA is probably the most complex feature in Excel, and it's easy to get over-
Jul 21, 2017 ... Kotlin can be used for any kind of development, be it server-side, client-side over web or Android. Kotlin currently is working upon other platforms such as embedded systems, macOS and. iOS which will shortly release in market. Just
By now, you've seen a large part of Kotlin's syntax in action. ... In this section, we'll discuss nullable types in Kotlin: how Kotlin marks values that ...... this book should visit www.manning.com/books/kotlin-in-action. $44.99 / Can $51.99 [ INCLU
PROGRAMMING THE MICROCONTROLLER ... EMCH 367 Fundamentals of Microcontrollers 367pck S01.doc ... programming.PDF
Academic Language of the English-Language Arts
Kotlin for Android Developers Learn Kotlin in an easy way while developing an Android App. UPDATED TO 1.0 Antonio Leiva . #general 4391 members Welcome. have fun
Combining Kotlin and Java. ○ Domain-specific languages. This book is for experienced Java developers. Dmitry Jemerov and Svetlana Isakova are core Kotlin developers at JetBrains. To download their free eBook in PDF, ePub, and Kindle formats, owners o
6 days ago ... Follow the Getting Started with Android and Kotlin tutorial to create your first Kotlin application. For a more in-depth introduction, check out the reference documentation on this site and Kotlin Koans. Another great resource is Kotli
The Python Language Reference, Release 3.2.3 Release 3.2 Date June 18, 2012 This reference manual describes the syntax and “core semantics” of the language
cplusplus.com C++ Language Tutorial Written by: Juan Soulié Last revision: June, 2007 Available online at: http://www.cplusplus.com/doc/tutorial/
The Kotlin Programming Language Andrey Breslav Dmitry Jemerov
What is Kotlin? • • • • •
Statically typed JVM-targeted general-purpose programming language developed by JetBrains
• Docs available today • Beta planned for the end of 2011
What is Kotlin? (II) • Number of research papers we plan to publish related to Kotlin? – Zero – Or close to that)
Higher-order functions fun filter( c : Iterable, f : fun (T) : Boolean ) : Iterable val list = list("a", "ab", "abc", "") filter(list, {s => s.length() < 3}) – yields ["a", "ab", ""] – Convention: last function literal argument
HTML example (I) • Function definition fun html(init : fun HTML.() : Unit) : HTML { val html = HTML() html.init() return html }
• Usage html { this.addMeta( httpEquiv="content-type", content="text/html;charset=UTF-8") }
HTML example (II) • Function definition fun html(init : fun HTML.() : Unit) : HTML { val html = HTML() html.init() return html }
• Usage html { addMeta( httpEquiv="content-type", content="text/html;charset=UTF-8") }
Builders in Groovy html { head { title "XML encoding with Groovy" } body { h1 "XML encoding with Groovy" p "this format can be used as an alternative markup to XML" /* an element with attributes and text content */ ahref:'http://groovy.codehaus.org' ["Groovy"] }
Builders in Kotlin html { head { title { +"XML encoding with Kotlin" } } body { h1 { +"XML encoding with Kotlin" } p { +"this format can be used as an alternative markup to XML" } /* an element with attributes and text content */ a (href="http://jetbrains.com/kotlin") { +"Kotlin" } }
• The big difference: the Kotlin version is statically type-checked
Builders in Kotlin: Implementation (I) abstract class Tag(val name : String) : Element { val children = ArrayList() val attributes = HashMap() } abstract class TagWithText(name : String) : Tag(name) { fun String.plus() { children.add(TextElement(this)) } } class HTML() : TagWithText("html") { fun head(init : fun Head.() : Unit) { … } fun body(init : fun Body.() : Unit) { … } }
Builders in Kotlin: Implementation (II) fun html(init : fun HTML.() : Unit) : HTML { val html = HTML() html.init() return html } class HTML() : TagWithText("html") { fun head(init : fun Head.() : Unit) { val head = Head() head.init() children.add(head) } }
Builders in Kotlin: Implementation (III) a (href="http://jetbrains.com/kotlin") { +"Kotlin" } class BodyTag(name : String) : TagWithText(name) { fun a(href : String, init : fun A.() : Unit) : A { val a = A() a.init() a.attributes["href"] = href children.add(a) } }
Foreach example (I) inline fun Iterable.foreach( body : fun(T) : Unit ) { for (item in this) body(item) } Example usage: list map {it.length() > 2} foreach { print(it) }
Foreach example (II) fun hasZero(list : List) : Boolean { // A call to an inline function list.foreach { if (it == 0) return true // Non-local return } return false } • Unqualified return always returns from a named function
Qualified returns • Function literals may be marked with labels:
@label {x => )} • To make a local return, use qualified form:
@label { x => ) return@label )
}
Labels, Break and Continue @outer for (x in list1) { for (y in list2) { if ()) { // Breaks the inner loop break } if ()) { // Breaks the outer loop break@outer } } }
Breaks in foreach() @outer list1.foreach { x => list2.foreach { y => if ()) { // Breaks the inner loop break } if ()) { // Breaks the outer loop break@outer } } }
Breakable foreach() inline fun Iterable.foreach( body : breakable fun(T) : Unit ) { @@ for (item in this) { // A break from body() breaks the loop body(item) } }