Uploaded image for project: 'Apache Freemarker'
  1. Apache Freemarker
  2. FREEMARKER-62

?sort_by to accept Iterable

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.26-incubating
    • Fix Version/s: None
    • Component/s: engine
    • Labels:
      None

      Description

      Currently, ?sort_by() only accepts a List.
      It's not complicated to create an iteratorToList() FreemarkerMethod, though.

      So this is a suggestion to make ?sort_by accept an Iterable, and if it detects it was called for Iterable and not a List, it would create the sorted list. It could use heapsort maybe.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pekarna Ondra Žižka
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: