This would normally be done via reflection, as Google's JSON library for Java, Gson, does. But by having a compiler plugin, they generate source code at "compile time" which basically looks at the type declaration and generates custom-made handlers that can parse/write JSON for them.
Re: Kotlin Meta and CT programming vs D
Renato Athaydes via Digitalmars-d-learn Mon, 23 Dec 2024 04:21:41 -0800
I forgot to mention, Kotlin also has some features that rely on
compiler plugins, like serialization:
https://kotlinlang.org/docs/serialization.html#formats, usually
done via Gradle plugins.
- Re: Kotlin Meta and CT programmi... zjh via Digitalmars-d-learn
- Re: Kotlin Meta and CT programmi... H. S. Teoh via Digitalmars-d-learn
- Re: Kotlin Meta and CT programmi... Jürgen Reichmann via Digitalmars-d-learn
- Re: Kotlin Meta and CT prog... Jo Blow via Digitalmars-d-learn
- Re: Kotlin Meta and CT programmi... Jo Blow via Digitalmars-d-learn
- Re: Kotlin Meta and CT prog... H. S. Teoh via Digitalmars-d-learn
- Re: Kotlin Meta and CT prog... Jo Blow via Digitalmars-d-learn
- Re: Kotlin Meta and CT programmi... Sergey via Digitalmars-d-learn
- Re: Kotlin Meta and CT prog... Jo Blow via Digitalmars-d-learn
- Re: Kotlin Meta and CT programmi... Renato Athaydes via Digitalmars-d-learn
- Re: Kotlin Meta and CT prog... Renato Athaydes via Digitalmars-d-learn
- Re: Kotlin Meta and CT prog... Jo Blow via Digitalmars-d-learn
- Re: Kotlin Meta and CT ... Dom DiSc via Digitalmars-d-learn
- Re: Kotlin Meta and... Jo Blow via Digitalmars-d-learn
- Re: Kotlin Meta... monkyyy via Digitalmars-d-learn
- Re: Kotlin Meta... Dom DiSc via Digitalmars-d-learn