http://techtalks.nsu.ru
Видеозапись: https://www.youtube.com/watch?v=1AW9aus1mTE
3 ноября 2015. Алексей Жидков (Excelsior) рассказывает про Kotlin
«Kotlin — это относительно молодой JVM-based язык, поддерживающий в том числе компиляцию в Javascript. В этом докладе мы расскажем о том, зачем создавался Kotlin, покажем наиболее интересные его фичи путем решения небольшой, но реальной практической задачи, а также дадим простой рецепт, который позволит определить, нужен ли вам Kotlin или нет.
К слову, Kotlin был создан в России. Часто ли вы пишете на языках отечественного производства?»
Лекция прочитана в рамках проекта Tech Talks @NSU – серии открытых лекций о разработке ПО и карьере в IT, проводимых в Новосибирском государственном университете.
Подробности: http://techtalks.nsu.ru
http://techtalks.nsu.ru
Видеозапись: https://www.youtube.com/watch?v=1AW9aus1mTE
3 ноября 2015. Алексей Жидков (Excelsior) рассказывает про Kotlin
«Kotlin — это относительно молодой JVM-based язык, поддерживающий в том числе компиляцию в Javascript. В этом докладе мы расскажем о том, зачем создавался Kotlin, покажем наиболее интересные его фичи путем решения небольшой, но реальной практической задачи, а также дадим простой рецепт, который позволит определить, нужен ли вам Kotlin или нет.
К слову, Kotlin был создан в России. Часто ли вы пишете на языках отечественного производства?»
Лекция прочитана в рамках проекта Tech Talks @NSU – серии открытых лекций о разработке ПО и карьере в IT, проводимых в Новосибирском государственном университете.
Подробности: http://techtalks.nsu.ru
If you still haven't heard of it, there is a new star in JVM sky - Kotlin. This short presentation will serve as intro for those who wan't to hear what's all the fuss about and dive deeper into this new alternative to Java
Infinum Android Talks #20 - Benefits of using KotlinInfinum
After this talk, using plain old Java for Android development will no longer be good enough for you. You have been warned. Presented by Dino Kovač from Infinum.
Kotlin advanced - language reference for android developersBartosz Kosarzycki
StxNext Lightning Talks - Mar 11, 2016
Kotlin Advanced - language reference for Android developers
This presentation contains the second talk on Kotlin language we had at STXNext. We try go deeper into language specifics and look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
We present real-world example based on Stx-Insider project written in Kotlin which incorporates Dagger 2, Kotterknife, Retrofit2 and is composed of 5+ Activities.
Full agenda
Live templates
Enum translation
Calling extension functions from Kotlin/Java
Constructors with backing fields
Warnings
F-bound polymorphism
Variance (Covariance/Contravariance)
Variance comparison in Kotlin/Java/Scala
Annotation processing - KAPT
SAM conversions
Type equality
Lambda vs Closure
Reified generics
Fluent interfaces
Infix notation
Static extension methods in Kotlin
Generic types
Sealed classes
Dokka - documentation in Kotlin
J2K converter
Real-world example
Reflection
Presentation is accompanied with an example project (StxInsider):
https://github.com/kosiara/stx-insider
While the Java platform has gained notoriety in the last 15 years as a robust application platform with a thriving ecosystem and well-established practices, the Java language has had its share of criticism. Highly verbose, overly didactic, limited feature set; whichever flavor of criticism you prefer, it's patently obvious that Java is playing catch up to more modern languages with a less rigid evolution path.
The language landscape today is vastly different than it had been five or ten years ago; a wide array of languages are available, designed to suit a variety of flavors: Groovy, Clojure, Scala, Gosu, Kotlin... which should you choose? This lecture focuses on one company's decision to focus on Scala, and presents a case study based on our experiences using Scala in practice, in the hope of providing much-needed real world context to assist your decision.
This presentation was used for the Scala In Practice lecture at the Botzia Israeli Java User Group meeting, May 3rd 2012.
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
JS 基礎知識,解說使用變數在操作時,不同型別的行為差異(純值與物件 / 傳值與傳參考),以及 ’this‘ 的變化、 Class 宣告方式...等。
A brief description of JavaScript ,introducing basic usage like for loop / class / different this in global function or object function.
4. "Which Programming Language would you use *now*
on top of JVM, except Java?". The answer was
surprisingly fast and very clear: - Scala.
http://www.adam-bien.com/roller/abien/entry/java_net_javaone_which_programming
5. I can honestly say if someone had shown me
theProgramming in Scala book by by Martin
Odersky, Lex Spoon & Bill Venners back in 2003 I'd
probably have never created Groovy.
http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html
26. 简化
val i = 1.2.toInt
val list = List(1, 2, 3)
val map = Map("Guangzhou" -> "GZ",
"Shenzhen" -> "SZ")
27. 简化
val i = 1.2.toInt
val list = List(1, 2, 3)
val map = Map("Guangzhou" -> "GZ",
"Shenzhen" -> "SZ")
class MyClass(x: Int, y: Int) {}
28. 简化
val i = 1.2.toInt
val list = List(1, 2, 3)
val map = Map("Guangzhou" -> "GZ",
"Shenzhen" -> "SZ")
class MyClass(x: Int, y: Int) {}
list.exists(_ == 2) //true
29. 简化
val i = 1.2.toInt
val list = List(1, 2, 3)
val map = Map("Guangzhou" -> "GZ",
"Shenzhen" -> "SZ")
class MyClass(x: Int, y: Int) {}
list.exists(_ == 2) //true
val (a, b, _) = (x, y, z)
42. Trait
class Animal { xxx }
trait CanFly {
def fly {
println("fly")
}
}
class Bird extends Animal
with CanFly {}
43. Trait
class Animal { xxx }
trait CanFly {
Mixin,类似多集成 def fly {
println("fly")
接口和实现一起出现 }
}
是什么和拥有什么功能
class Bird extends Animal
with CanFly {}
44. Trait
class Fish { xxx }
trait CanFly {
def fly {
println("fly")
}
}
val flyFish = new Fish with CanFly
45. Actors
val myActor = actor {
loop {
react {
case "Send" => {
println("Get")
}
}
}
}
myActor ! "Send"
46. 模式匹配
def matchTest(x: Any) = x match {
case 1 => "number one"
case y: Int if y > 0 => y + 1
case head :: tail => tail
case Send(a, _) => a
case ("Send", _, b: String) => b
case _ => x
}
63. It took about 15 hours to recreate the publishing
daemon in Clojure and get it to pass all our tests.
Today we ran a "soak test" publishing nearly
300,000 profiles in one run. The Scala code would
fail with OoM exceptions if we hit it with 50,000
profiles in one run (sometimes less).
http://groups.google.com/group/clojure/browse_thread/thread/b18f9006c068f0a0
64. The e-mail confirms that Yammer is moving its basic
infrastructure stack from Scala back to Java, owing
to issues with complexity and performance.
http://www.infoq.com/news/2011/11/yammer-scala