Skip to content

Rename ExprResult and change pattern #7922

Open
@Fusezion

Description

@Fusezion

Suggestion

Rename the ExprResult class to something more suiting of what it's used for.

Change the pattern of ExprResult into a more explicit less generalized pattern.

Why?

The current name of the class doesn't provide a good convention or idea on what it's actually for, in the case here it's only for getting the results of an executable so maybe ExprExecutableResult?

The pattern is too generic and broad which could easily lead to conflicts or improper expectations of what the syntax might be used for.

the minimum of the pattern rn is result of %executables% but this could easily cause for poor implementations if someone ever decides on wanting to implement results of more areas.

i.e. result of target block -> returns the result slot of a block (i.e. furnances)
result of recipe with id "minecraft:crafting_table" an alternative syntax to forcing recipe result of recipe with id "" forcing recipe to become repeated.

Other

This may easily just be my impression but I truly feel like if something is going to be so specific the pattern should properly emphasis it. ExprResult accepts additional parameters for arguments making implementations like above not very friendly if someone does result of recipe with id "" with arguments "", ""

I am however unable to think of any pattern change that could be done since I can only come up with execution result of {_executable}

Luckily reflection is still experimental and we can have a proper up for debates discussion about this, if we feel there's a need.

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature request, an issue about something that could be improved, or a PR improving something.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions