by cryptos · 2y ago · 0 comments
However, I agree with your second part, the DSL as such. The syntax is arbitrary in many cases and just not easy to remember or to make sense of. It looks like a DSL for the sake of a DSL. Take a look at this example (https://docs.gradle.org/current/userguide/plugins.html):
plugins {
application // by name
java // by name
id("java") // by id - recommended
id("org.jetbrains.kotlin.jvm") version "1.9.0" // by id - recommended
}
Why are there two ways to reference a plug-in? Why is the version written without parenthesis? Why is version an infix operator? Why not something as simple and consistent as this: plugins {
plugin(id="org.jetbrains.kotlin.jvm", version="1.9.0")
}
How does the DSL help here? Is it more readable? Easier to lear or to remember?Just look at Guice how nice a DSL can look like with pure Java:
bind(CreditCardProcessor.class)
.annotatedWith(PayPal.class)
.to(PayPalCreditCardProcessor.class);
I'd really whish Java had build tools with better developer experience. I whish Mill the best luck!No comments yet.