-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why the builder generate nullable types fields for not nullable type fields? #47
Comments
When the builder is created, no value for |
What about using |
I guess that is a question of style. In my opinion public lateinit fields just make it easier to write code that breaks |
It could be. But on the other side, it's coherent with the underlying object to build. Also, since the field is mandatory, it does fit perfectly the logic of (and it still can be checked with |
I don't see value in that, and it makes problems in implementation, e.g. primitive values can't be lateinit. Do you have an example where this would improve something beyond personal preference? |
Primitives shall be initialized to their default value, as in Java, This looks simply weird, it caught my eye at the very first example I was experimenting with |
First of all, super cool project, this is something I wanted to write myself, but I didn't have enough skills for that :p
Anyway, as titled, why AutoDsl generated for
class Person(val name: String)
a builder with thename
field asString?
instead ofString
?The text was updated successfully, but these errors were encountered: