[–] owlstuffing 4mo ago ↗ Explores advanced optional parameters & named arguments as a Java compiler plugin. Complete IDE integration available with IntelliJ.Key features- Optional parameters -- Define default values directly in methods, constructors, and records- Named arguments -- Call methods using parameter names for clarity and flexibility- Flexible defaults -- Use expressions, reference earlier parameters, and access local methods and fields- Customizable behavior -- Override default values in subclasses or other contexts- Safe API evolution -- Add parameters or change defaults without breaking binary or source compatibility- Eliminates overloads and builders -- Collapse boilerplate into a single, expressive method or constructor- IDE-friendly -- Fully supported in IntelliJ IDEA and Android Studio
1 comment
[ 3.4 ms ] story [ 16.2 ms ] threadKey features
- Optional parameters -- Define default values directly in methods, constructors, and records
- Named arguments -- Call methods using parameter names for clarity and flexibility
- Flexible defaults -- Use expressions, reference earlier parameters, and access local methods and fields
- Customizable behavior -- Override default values in subclasses or other contexts
- Safe API evolution -- Add parameters or change defaults without breaking binary or source compatibility
- Eliminates overloads and builders -- Collapse boilerplate into a single, expressive method or constructor
- IDE-friendly -- Fully supported in IntelliJ IDEA and Android Studio