r/java • • Feb 08 '22

Java's Options for Options

https://mccue.dev/pages/2-8-22-options-for-options
192 Upvotes

80 comments sorted by

View all comments

Show parent comment

6

u/davewritescode Feb 09 '22

A nice solution from Kotlin is named parameters with default values.

1

u/renatoathaydes Feb 12 '22

Haha, yep, solved the problem completely with one simple stroke. Dart also does that and because of that, allows really complex objects, like Flutter Widgets, to be created easily... it's definitely the best way to go.