2 Replies Latest reply on May 26, 2010 2:13 AM by Peter Kahrel

    [JS/ES] Ann: Operator Overloading in ExtendScript

    Marc Autret Level 4

      Hi everyone,


      I recently discovered that ExtendScript allows you to extend/override operators. It's a pretty old feature but I had not paid attention until now.

      For example, you can create a + operator to compute Array object the way you want, or a * operator to multiplicate a String by a number, etc. You can also create a complete set of friendly operators for a fresh new class.


      You'll find some practical examples (including the prototype of a Complex class) on Indiscripts:



      I hope it will interest you.