Join Slack
I created an issue for inserting a value for a constant at compile time, the one feature I miss from...
# announcements
s
serebit
01/16/2021, 6:15 PM
I created an issue for inserting a value for a constant at compile time, the one feature I miss from Go. Link:
https://youtrack.jetbrains.com/issue/KT-44386
d
Dominaezzz
01/16/2021, 6:49 PM
I swear there's a compiler plugin for this.
Dominaezzz
01/16/2021, 6:49 PM
I think it's called
BuildKonfig
or something.
s
serebit
01/16/2021, 6:50 PM
Found it:
https://github.com/yshrsmz/BuildKonfig
serebit
01/16/2021, 6:51 PM
Seems a lot more complex than necessary for the feature, though. This is more so codegen than what I had in mind.
d
Dominaezzz
01/16/2021, 6:52 PM
Yeah, it's a bit much. Perhaps a compiler plugin could make this better.
Dominaezzz
01/16/2021, 6:53 PM
Here's an example compiler plugin, if you're not familiar.
https://github.com/bnorm/kotlin-power-assert
s
serebit
01/16/2021, 6:57 PM
I could (and might) attempt writing a compiler plugin for this, though I do believe it's valuable enough to include as base compiler functionality. I'll give it some thought.
3
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by