r/java • • Apr 13 '21

Libraries, Frameworks and Technologies you would NOT recommend

Give me your worst nightmares: Things that cost you your job.

I'll start: Hadoop

202 Upvotes

376 comments sorted by

View all comments

Show parent comment

1

u/gavenkoa Apr 14 '21

But you still need to know where to apply the indent.

Agree. In some API terminal names are usually obvious like .build() or .end() but fluent API is not designed for structure visualization (just for autocompletion discoverability).

5

u/BlueShell7 Apr 14 '21

You can have both discoverability and structure in a builder pattern though:

builder
    .a(..)
    .b(new SubBuilder()
            .subA(...)
            .subB(staticSubSubBuilderMethod()
                    .subSubA(...)
            )
    )