Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-489

Handle += / -= with consistent semantics

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 3.5.0
    • Component/s: Compiler
    • Labels:
      None
    • Template:
    • Story Points:
      1

      Description

      The current 4x implementation does this:

      • if referenced and given are numeric, do arithmetic + or -
      • if referenced and given are collections, do concat/merge
      • else fail (no string concatenation)

      Decide:

      • is this implementation ok
      • should string concatenation be allowed (+ is not string concat elsewhere)
      • Remove in favor of explicit $a = $a + [ ] (etc. possible because hashes and arrays support + operator).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              henrik.lindberg Henrik Lindberg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support