Pair and Triple - Programming with Kotlin from the Ground Up! - raywenderlich.com

Опубликовано: 25 Июнь 2018
на канале: Kodeco
894
13

Learn about two Kotlin classes, Pair and Triple, and get tips about when you should use each of them.

View the full course over here:

https://videos.raywenderlich.com/cour...

---

About www.raywenderlich.com:

raywenderlich.com is a website focused on developing high quality programming tutorials. Our goal is to take the coolest and most challenging topics and make them easy for everyone to learn – so we can all make amazing apps.

We are also focused on developing a strong community. Our goal is to help each other reach our dreams through friendship and cooperation. As you can see below, a bunch of us have joined forces to make this happen: authors, editors, subject matter experts, app reviewers, and most importantly our amazing readers!

---

About Kotlin (from Wikipedia)


Kotlin is a statically typed programming language that runs on the Java virtual machine and also can be compiled to JavaScript source code or use the LLVM compiler infrastructure. Its primary development is from a team of JetBrains programmers based in Saint Petersburg, Russia. While the syntax is not compatible with Java, the JVM implementation of Kotlin's standard library is designed to interoperate with Java code and is reliant on Java code from the existing Java Class Library, such as the collections framework[3]. Kotlin uses aggressive type inference to determine the type of values and expressions for which type has been left unstated. This reduces language verbosity relative to Java, which demands often entirely redundant type specifications prior to version 10.

As of Android Studio 3.0 (October 2017) Kotlin is a fully supported programming language by Google on the Android Operating System, and is directly included in the Android Studio 3.0 IDE package as an alternative to the standard Java compiler. The Android Kotlin compiler lets the user choose between targeting Java 6- or Java 8-compatible bytecode.

History

In July 2011, JetBrains unveiled Project Kotlin, a new language for the JVM, which had been under development for a year. JetBrains lead Dmitry Jemerov said that most languages did not have the features they were looking for, with the exception of Scala. However, he cited the slow compile time of Scala as an obvious deficiency.[6] One of the stated goals of Kotlin is to compile as quickly as Java. In February 2012, JetBrains open sourced the project under the Apache 2 license.

The name comes from Kotlin Island, near St. Petersburg. Andrey Breslav mentioned that the team decided to name it after an island just like Java was named after the Indonesian island of Java[8] (though the programming language Java was perhaps named after the coffee.)

JetBrains hopes that the new language will drive IntelliJ IDEA sales.

Kotlin v1.0 was released on February 15, 2016. This is considered to be the first officially stable release and JetBrains has committed to long-term backwards compatibility starting with this version.

At Google I/O 2017, Google announced first-class support for Kotlin on Android.

Kotlin v1.2 was released on November 28, 2017. Sharing Code between JVM and Javascript platforms feature was newly added to this release.

Philosphy

Development lead Andrey Breslav has said that Kotlin is designed to be an industrial-strength object-oriented language, and a "better language" than Java, but still be fully interoperable with Java code, allowing companies to make a gradual migration from Java to Kotlin.

Semicolons are optional as a statement terminator; in most cases a newline is sufficient for the compiler to deduce that the statement has ended.

Kotlin variable declarations and parameter lists have the data type come after the variable name (and with a colon separator), similar to Pascal.

Variables in Kotlin can be immutable, declared with the val keyword, or mutable, declared with the var keyword.

Class members are public by default, and the classes themselves are sealed by default meaning that creating a derived class is disabled unless explicit keywords in the base class are present to enable it.

In addition to the classes and methods (called member functions in Kotlin) of object-oriented programming, Kotlin also supports procedural programming with the use of functions.


Смотрите видео Pair and Triple - Programming with Kotlin from the Ground Up! - raywenderlich.com онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Kodeco 25 Июнь 2018. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 894 раз и оно понравилось 13 посетителям.