https://kotlinlang.org logo
#language-evolution
Title
# language-evolution
b

Brendan Campbell-hartzell

07/14/2022, 5:56 PM
The idea of compiler plugins has been floating around for a while now, and 1.7.0 has started to make some strides in that direction. Is the plan for compiler plugins to eventually work similarly to Rust's macros? Effectively allowing the kotlin community to build their own kotlin features and syntax? Or am I thinking about this incorrectly?
d

dmitriy.novozhilov

07/14/2022, 7:54 PM
No, Kotlin moves in opposite direction Allowing adding new syntax with plugins has two very big concerns: 1. It may turn Kotlin into numerous of local dialects, which will greatly increase complexity for new users 2. It's extremely hard to support such plugins in tooling (IDE, linters, etc) So we are trying to provide such compiler API, which allows users to create really cool things with compiler from one side, and keep the language solid from the other
8 Views