Skip to content

Add an in-line sort by expression #8366

@Fusezion

Description

@Fusezion

Suggestion

Add an in-lined sort x in (ascending|descending) orer by y expression that functions the same way as its counterpart effect

Why?

Quite often I find myself making a copy of a variable simply to sort it and reorder the variable I just made a copy of.
Adding an expression that allows me to cut out that extra step just helps save time in that aspect.

I never understood why the ExprSorted never received an updated pattern to follow the behavior of EffSort

Other

Example skript for how we currently are forced to handle this

function example() :: objects:
    copy {-myStoredObjects::*} into {_myChangedObjects::*}
    sort  {_myChangedObjects::*} in descending order by (name of input)
    return {_myChangedObjects::*}

where this could have instead been

function example() :: objects:
    return {-myStoredObjects::*} sorted in descending order by (name of input)

Agreement

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurePull request adding a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions