-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Updates SyntaxStringBuilder to return itself #7244
Conversation
You can already chain arguments like this builder.append(x, "and", y); Which is more readable than chained append calls on a single line ( This also encourages ternaries inside the append methods, as this encourages putting everything into a single expression, instead of being spread out over multiple statements with explicit This is against the point of the SSB, which makes the Because of the unexpected popularity of the SSB, we may want to consider adding support for easy one-liners to it, e.g. new SyntaxStringBuilder(event, debug).single(x, "and", y); Or similar. Personally, I support this, but a better solution should probably be discussed. |
I still think there's merit in having it return itself. The behaviour you describe is still there obviously, but I think this just adds an alternative which could be useful. If I'm alone in this line of thinking, then I can close it, but it seems like there's no downside to it. |
I prefer having |
Description
Makes the SyntaxStringBuilder's append methods return itself.
Allows for stuff nicer feeling stuff like:
Target Minecraft Versions: any
Requirements: none
Related Issues: none