Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin DSL パターン

doyaaaaaken
September 09, 2019

Kotlin DSL パターン

2019/09/09のKotlin Fest Rejected Conf 2019で発表したスライド。

doyaaaaaken

September 09, 2019
Tweet

More Decks by doyaaaaaken

Other Decks in Programming

Transcript

  1. KOTLIN DSL ύλʔϯ 2019/9/9 Kotlin Fest Rejected Conference 2019 খࢁ

    ݈ଠ (Koyama Kenta)
 Twitter/Github @doyaaaaaken
  2. DSLΛࢧ͑Δٕज़܈ • infix functionʢதஔه๏ʣ • extension functionʢ֦ுؔ਺ʣ • Lambda as

    last functionʢؔ਺ͷ࠷ޙͷҾ਺͕Lambdaͷ৔߹ͷলུه๏ʣ • Lambda with receiverʢϨγʔό෇͖Lambdaʣ • Property Delegation ʢϓϩύςΟҕৡʣ • [ࠓճऔΓ্͛ͳ͍΋ͷ] • @DslMarker annotationʢDSL࡞੒࣌ͷείʔϓ੍ޚ༻ͷΞϊςʔγϣϯʣ • type aliasʢܕΤΠϦΞεʣ • inline class ࢀߟ: Deep Dive into Kotlin DSL: https://speakerdeck.com/jmatsu/ri-ben-yu-zhu-shi-tuki-deep-dive-into-kotlin-dsl
 Production Kotlin DSL: https://t.co/W6Th9qv7wQ?amp=1